54 #ifdef POK_NEEDS_LIBMATH
56 #include "math_private.h"
59 one= 1.00000000000000000000e+00,
60 pi = 3.14159265358979311600e+00,
61 pio2_hi = 1.57079632679489655800e+00,
62 pio2_lo = 6.12323399573676603587e-17,
63 pS0 = 1.66666666666666657415e-01,
64 pS1 = -3.25565818622400915405e-01,
65 pS2 = 2.01212532134862925881e-01,
66 pS3 = -4.00555345006794114027e-02,
67 pS4 = 7.91534994289814532176e-04,
68 pS5 = 3.47933107596021167570e-05,
69 qS1 = -2.40339491173441421878e+00,
70 qS2 = 2.02094576023350569471e+00,
71 qS3 = -6.88283971605453293030e-01,
72 qS4 = 7.70381505559019352791e-02;
75 __ieee754_acos(
double x)
77 double z,p,q,r,w,s,c,df;
84 if(((ix-0x3ff00000)|lx)==0) {
86 else return pi+2.0*pio2_lo;
91 if(ix<=0x3c600000)
return pio2_hi+pio2_lo;
93 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
94 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
96 return pio2_hi - (x - (pio2_lo-x*r));
99 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
100 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));
101 s = __ieee754_sqrt(z);
104 return pi - 2.0*(s+w);
107 s = __ieee754_sqrt(z);
110 c = (z-df*df)/(s+df);
111 p = z*(pS0+z*(pS1+z*(pS2+z*(pS3+z*(pS4+z*pS5)))));
112 q = one+z*(qS1+z*(qS2+z*(qS3+z*qS4)));