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.16134119023996228053e+4,
24 -0.99225929672236083313e+2,
25 -0.96437492777225469787e+0
28 0.48402357071988688686e+4,
29 0.22337720718962312926e+4,
30 0.11274474380534949335e+3,
41 if (x
>= 0.5*M_LN_MAX_D
) {
44 #define LN3D2 0.54930614433405484570e+0 /* ln(3)/2 */
46 x
= 0.5 - 1.0/(exp(x
+x
)+1.0);
50 /* ??? avoid underflow ??? */
52 x
+= x
* g
* POLYNOM2(g
, p
)/POLYNOM3(g
, q
);
54 return negative
? -x
: x
;