2 floating-point arctangent
4 atan returns the value of the arctangent of its
5 argument in the range [-pi/2,pi/2].
7 atan2 returns the arctangent of arg1/arg2
10 there are no error returns.
12 coefficients are #5077 from Hart & Cheney. (19.56D)
18 #define sq2p1 2.414213562373095048802e0
19 #define sq2m1 .414213562373095048802e0
20 #define p4 .161536412982230228262e2
21 #define p3 .26842548195503973794141e3
22 #define p2 .11530293515404850115428136e4
23 #define p1 .178040631643319697105464587e4
24 #define p0 .89678597403663861959987488e3
25 #define q4 .5895697050844462222791e2
26 #define q3 .536265374031215315104235e3
27 #define q2 .16667838148816337184521798e4
28 #define q1 .207933497444540981287275926e4
29 #define q0 .89678597403663861962481162e3
33 xatan evaluates a series valid in the
34 range [-0.414...,+0.414...]. (tan(pi/8))
44 value = ((((p4*argsq + p3)*argsq + p2)*argsq + p1)*argsq + p0);
45 value = value/(((((argsq + q4)*argsq + q3)*argsq + q2)*argsq + q1)*argsq + q0);
50 satan reduces its argument (known to be positive)
51 to the range [0,0.414...] and calls xatan.
62 return PIO2 - xatan(1/arg);
63 return PIO2/2 + xatan((arg-1)/(arg+1));
67 atan makes its argument positive and
68 calls the inner routine satan.