2 * (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 * Author: Ceriel J.H. Jacobs
12 #include "localmath.h"
17 /* Algorithm and coefficients from:
18 "Software manual for the elementary functions"
19 by W.J. Cody and W. Waite, Prentice-Hall, 1980
23 -0.13688768894191926929e+2,
24 -0.20505855195861651981e+2,
25 -0.84946240351320683534e+1,
26 -0.83758299368150059274e+0
29 0.41066306682575781263e+2,
30 0.86157349597130242515e+2,
31 0.59578436142597344465e+2,
32 0.15024001160028576121e+2,
37 0.52359877559829887307710723554658381, /* pi/6 */
39 1.04719755119659774615421446109316763 /* pi/3 */
59 if (x
> 0.26794919243112270647) { /* 2-sqtr(3) */
61 x
= (((0.73205080756887729353*x
-0.5)-0.5)+x
)/
62 (1.73205080756887729353+x
);
65 /* ??? avoid underflow ??? */
68 x
+= x
* g
* POLYNOM3(g
, p
) / POLYNOM4(g
, q
);