2 agd - inverse gudermannian function
8 z number (real or complex)
9 eps nonzero real, defaults to epsilon()
11 return number or infinite error value
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
19 agd(z) is usually defined initially for real z with abs(z) < pi/2 by
22 agd(z) = ln(sec(z) + tan(z))
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.
32 If z = x + i * y and abs(x) < pi/2, agd(z) is given by
34 agd(z) = atanh(sin(x)/cosh(y)) + i * atan(sinh(y)/cos(x)>
38 > print agd(1, 1e-5), agd(1, 1e-10), agd(1, 1e-15)
39 1.22619 1.2261911709 1.226191170883517
41 > print agd(2, 1e-5), agd(2, 1e-10)
42 1.52345-3.14159i 1.5234524436-3.1415926536i
44 > print agd(5, 1e-5), agd(5, 1e-10), agd(5, 1e-15)
45 -1.93237 -1.9323667197 -1.932366719745925
47 > print agd(1+2i, 1e-5), agd(1+2i, 1e-10)
48 .22751+1.42291i .2275106584+1.4229114625i
54 COMPLEX *cagd(COMPLEX *x, NUMBER *eps)
57 gd, exp, ln, sin, sinh, etc.