47 invsqrtpi= 5.64189583547756279280e-01,
48 two = 2.00000000000000000000e+00,
49 one = 1.00000000000000000000e+00;
51 static double zero = 0.00000000000000000000e+00;
61 double a, b, temp, di;
71 if((ix|((
unsigned)(lx|-lx))>>31)>0x7ff00000)
return x+x;
81 if((ix|lx)==0||ix>=0x7ff00000)
83 else if((
double)n<=x) {
100 case 0: temp =
cos(x)+
sin(x);
break;
101 case 1: temp = -
cos(x)+
sin(x);
break;
102 case 2: temp = -
cos(x)-
sin(x);
break;
103 case 3: temp =
cos(x)-
sin(x);
break;
105 b = invsqrtpi*temp/
sqrt(x);
111 b = b*((double)(i+i)/x) - a;
123 temp = x*0.5; b = temp;
124 for (a=
one,i=2;i<=n;i++) {
161 double q0,q1,h,tmp;
int k,m;
162 w = (n+n)/(
double)x; h = 2.0/(double)x;
163 q0 = w; z = w+h; q1 = w*z - 1.0; k=1;
171 for(t=
zero, i = 2*(n+k); i>=m; i -= 2) t =
one/(i/x-t);
185 if(tmp<7.09782712893383973096e+02) {
186 for(i=n-1,di=(
double)(i+i);i>0;i--){
194 for(i=n-1,di=(
double)(i+i);i>0;i--){
211 if(sgn==1)
return -b;
else return b;
229 if((ix|((
unsigned)(lx|-lx))>>31)>0x7ff00000)
return x+x;
230 if((ix|lx)==0)
return -
one/
zero;
235 sign = 1 - ((n&1)<<1);
239 if(ix==0x7ff00000)
return zero;
255 case 0: temp =
sin(x)-
cos(x);
break;
256 case 1: temp = -
sin(x)-
cos(x);
break;
257 case 2: temp = -
sin(x)+
cos(x);
break;
258 case 3: temp =
sin(x)+
cos(x);
break;
260 b = invsqrtpi*temp/
sqrt(x);
265 for(i=1;i<n&&(
__HI(b) != 0xfff00000);i++){
267 b = ((double)(i+i)/x)*b - a;
271 if(sign>0)
return b;
else return -b;