1 /* origin: FreeBSD /usr/src/lib/msun/src/e_acosf.c */
3 * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
6 * ====================================================
7 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
9 * Developed at SunPro, a Sun Microsystems, Inc. business.
10 * Permission to use, copy, modify, and distribute this
11 * software is freely granted, provided that this notice
13 * ====================================================
19 pio2_hi
= 1.5707962513e+00, /* 0x3fc90fda */
20 pio2_lo
= 7.5497894159e-08, /* 0x33a22168 */
21 pS0
= 1.6666586697e-01,
22 pS1
= -4.2743422091e-02,
23 pS2
= -8.6563630030e-03,
24 qS1
= -7.0662963390e-01;
26 static float R(float z
)
29 p
= z
*(pS0
+z
*(pS1
+z
*pS2
));
39 GET_FLOAT_WORD(hx
, x
);
42 if (ix
>= 0x3f800000) {
43 if (ix
== 0x3f800000) {
45 return 2*pio2_hi
+ 0x1p
-120f
;
51 if (ix
< 0x3f000000) {
52 if (ix
<= 0x32800000) /* |x| < 2**-26 */
53 return pio2_hi
+ 0x1p
-120f
;
54 return pio2_hi
- (x
- (pio2_lo
-x
*R(x
*x
)));
61 return 2*(pio2_hi
- (s
+w
));
67 SET_FLOAT_WORD(df
,hx
&0xfffff000);