Initial revision
[LeanCalc.git] / help / agd
1 NAME
2     agd - inverse gudermannian function
3
4 SYNOPSIS
5     agd(z [,eps])
6
7 TYPES
8     z           number (real or complex)
9     eps         nonzero real, defaults to epsilon()
10
11     return      number or infinite error value
12
13 DESCRIPTION
14     Calculate the inverse gudermannian of z to a nultiple of eps with
15     errors in real and imaginary parts less in absolute value than .75 * eps,
16     or an error value if z is very close to one of the one of the branch
17     points of agd(z)..
18
19     agd(z) is usually defined initially for real z with abs(z) < pi/2 by
20     one of the formulae
21
22                  agd(z) = ln(sec(z) + tan(z))
23
24                         = 2 * atanh(tan(z/2))
25
26                         = asinh(tan(z)),
27
28     or as the integral from 0 to z of (1/cos(t))dt.  For complex z, the
29     principal branch, approximated by gd(z, eps), has cuts along the real
30     axis outside -pi/2 < z < pi/2.
31
32     If z = x + i * y and abs(x) < pi/2, agd(z) is given by
33
34         agd(z) = atanh(sin(x)/cosh(y)) + i * atan(sinh(y)/cos(x)>
35
36
37 EXAMPLE
38     > print agd(1, 1e-5), agd(1, 1e-10), agd(1, 1e-15)
39     1.22619 1.2261911709 1.226191170883517
40
41     > print agd(2, 1e-5), agd(2, 1e-10)
42     1.52345-3.14159i 1.5234524436-3.1415926536i
43
44     > print agd(5, 1e-5), agd(5, 1e-10), agd(5, 1e-15)
45     -1.93237 -1.9323667197 -1.932366719745925
46
47     > print agd(1+2i, 1e-5), agd(1+2i, 1e-10)
48     .22751+1.42291i .2275106584+1.4229114625i
49
50 LIMITS
51     none
52
53 LINK LIBRARY
54     COMPLEX *cagd(COMPLEX *x, NUMBER *eps)
55
56 SEE ALSO
57     gd, exp, ln, sin, sinh, etc.
58