Initial revision
[LeanCalc.git] / help / gd
1 NAME
2     gd - gudermannian function
3
4 SYNOPSIS
5     gd(z [,eps])
6
7 TYPES
8     z           number (real or complex)
9     eps         nonzero real, defaults to epsilon()
10
11     return      number or "Log of zero or infinity" error value
12
13 DESCRIPTION
14     Calculate the gudermannian of z to a nultiple of eps with errors in
15     real and imaginary parts less in absolute value than .75 * eps,
16     or return an error value if z is close to one of the branch points
17     at odd multiples of (pi/2) * i.
18
19     gd(z) is usually defined initially for real z by one of the formulae
20
21                 gd(z) = 2 * atan(exp(z)) - pi/2
22
23                       = 2 * atan(tanh(z/2))
24
25                       = atan(sinh(z)),
26
27     or as the integral from 0 to z of (1/cosh(t))dt.  For complex z, the
28     principal branch, approximated by gd(z, eps), has the cut:
29     re(z) = 0, abs(im(z)) >= pi/2; on the cut calc takes gd(z) to be
30     the limit as z is approached from the right or left according as
31     im(z) > or < 0.
32
33     If z = x + y*i and abs(y) < pi/2, gd(z) is given by
34
35         gd(z) = atan(sinh(x)/cos(y)) + i * atanh(sin(y)/cosh(x)).
36
37 EXAMPLE
38     > print gd(1, 1e-5), gd(1, 1e-10), gd(1, 1e-15)
39     .86577 .8657694832 .865769483239659
40
41     > print gd(2+1i, 1e-5), gd(2+1i, 1e-10)
42     1.42291+.22751i 1.4229114625+.2275106584i
43
44 LIMITS
45     none
46
47 LINK LIBRARY
48     COMPLEX *cgd(COMPLEX *x, NUMBER *eps)
49
50 SEE ALSO
51     agd, exp, ln, sin, sinh, etc.
52