/bionic/libm/src/ |
D | s_tanhf.c | 23 static const float one=1.0, two=2.0, tiny = 1.0e-30, huge = 1.0e30; variable 35 if (jx>=0) return one/x+one; /* tanh(+-inf)=+-1 */ in tanhf() 36 else return one/x-one; /* tanh(NaN) = NaN */ in tanhf() 42 if(huge+x>one) return x; /* tanh(tiny) = tiny with inexact */ in tanhf() 46 z = one - two/(t+two); in tanhf() 53 z = one - tiny; /* raise inexact flag */ in tanhf()
|
D | s_tanh.c | 44 static const double one=1.0, two=2.0, tiny = 1.0e-300; variable 58 if (jx>=0) return one/x+one; /* tanh(+-inf)=+-1 */ in tanh() 59 else return one/x-one; /* tanh(NaN) = NaN */ in tanh() 65 return x*(one+x); /* tanh(small) = small */ in tanh() 68 z = one - two/(t+two); in tanh() 75 z = one - tiny; /* raised inexact flag */ in tanh()
|
D | s_asinh.c | 32 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ variable 45 if(huge+x>one) return x; /* return x inexact except 0 */ in asinh() 51 w = __ieee754_log(2.0*t+one/(__ieee754_sqrt(x*x+one)+t)); in asinh() 54 w =log1p(fabs(x)+t/(one+__ieee754_sqrt(one+t))); in asinh()
|
D | s_asinhf.c | 24 one = 1.0000000000e+00, /* 0x3F800000 */ variable 37 if(huge+x>one) return x; /* return x inexact except 0 */ in asinhf() 43 w = __ieee754_logf((float)2.0*t+one/(__ieee754_sqrtf(x*x+one)+t)); in asinhf() 46 w =log1pf(fabsf(x)+t/(one+__ieee754_sqrtf(one+t))); in asinhf()
|
D | e_acoshf.c | 24 one = 1.0, variable 44 return __ieee754_logf((float)2.0*x-one/(x+__ieee754_sqrtf(t-one))); in __ieee754_acoshf() 46 t = x-one; in __ieee754_acoshf()
|
D | e_acosh.c | 37 one = 1.0, variable 58 return __ieee754_log(2.0*x-one/(x+sqrt(t-one))); in __ieee754_acosh() 60 t = x-one; in __ieee754_acosh()
|
D | s_erff.c | 26 one = 1.0000000000e+00, /* 0x3F800000 */ variable 107 return (float)(1-i)+one/x; /* erf(+-inf)=+-1 */ in erff() 119 s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5)))); in erff() 124 s = fabsf(x)-one; in erff() 126 Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6))))); in erff() 130 if(hx>=0) return one-tiny; else return tiny-one; in erff() 133 s = one/(x*x); in erff() 137 S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*( in erff() 142 S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*( in erff() 148 if(hx>=0) return one-r/x; else return r/x-one; in erff() [all …]
|
D | s_erf.c | 118 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ variable 199 return (double)(1-i)+one/x; /* erf(+-inf)=+-1 */ in erf() 210 s = one+z*(qq1+z*(qq2+z*(qq3+z*(qq4+z*qq5)))); in erf() 215 s = fabs(x)-one; in erf() 217 Q = one+s*(qa1+s*(qa2+s*(qa3+s*(qa4+s*(qa5+s*qa6))))); in erf() 221 if(hx>=0) return one-tiny; else return tiny-one; in erf() 224 s = one/(x*x); in erf() 228 S=one+s*(sa1+s*(sa2+s*(sa3+s*(sa4+s*( in erf() 233 S=one+s*(sb1+s*(sb2+s*(sb3+s*(sb4+s*( in erf() 239 if(hx>=0) return one-r/x; else return r/x-one; in erf() [all …]
|
D | s_atanf.c | 52 one = 1.0, variable 70 if(huge+x>one) return x; /* raise inexact */ in atanf() 77 id = 0; x = ((float)2.0*x-one)/((float)2.0+x); in atanf() 79 id = 1; x = (x-one)/(x+one); in atanf() 83 id = 2; x = (x-(float)1.5)/(one+(float)1.5*x); in atanf()
|
D | e_coshf.c | 23 static const float one = 1.0, half=0.5, huge = 1.0e30; variable 40 w = one+t; in __ieee754_coshf() 41 if (ix<0x39800000) return one; /* cosh(tiny) = 1 */ in __ieee754_coshf() 42 return one+(t*t)/(w+w); in __ieee754_coshf()
|
D | e_sinhf.c | 23 static const float one = 1.0, shuge = 1.0e37; variable 42 if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */ in __ieee754_sinhf() 44 if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one)); in __ieee754_sinhf() 45 return h*(t+t/(t+one)); in __ieee754_sinhf()
|
D | s_atan.c | 69 one = 1.0, variable 90 if(huge+x>one) return x; /* raise inexact */ in atan() 97 id = 0; x = (2.0*x-one)/(2.0+x); in atan() 99 id = 1; x = (x-one)/(x+one); in atan() 103 id = 2; x = (x-1.5)/(one+1.5*x); in atan()
|
D | e_sqrtf.c | 23 static const float one = 1.0, tiny=1.0e-30; variable 76 z = one-tiny; /* trigger inexact flag */ in __ieee754_sqrtf() 77 if (z>=one) { in __ieee754_sqrtf() 78 z = one+tiny; in __ieee754_sqrtf() 79 if (z>one) in __ieee754_sqrtf()
|
D | e_j0f.c | 28 one = 1.0, variable 51 if(ix>=0x7f800000) return one/(x*x); in __ieee754_j0f() 75 if(huge+x>one) { /* raise inexact if x != 0 */ in __ieee754_j0f() 76 if(ix<0x32000000) return one; /* |x|<2**-27 */ in __ieee754_j0f() 77 else return one - (float)0.25*x*x; in __ieee754_j0f() 82 s = one+z*(S01+z*(S02+z*(S03+z*S04))); in __ieee754_j0f() 84 return one + z*((float)-0.25+(r/s)); in __ieee754_j0f() 87 return((one+u)*(one-u)+z*(r/s)); in __ieee754_j0f() 113 if(ix>=0x7f800000) return one/(x+x*x); in __ieee754_y0f() 114 if(ix==0) return -one/zero; in __ieee754_y0f() [all …]
|
D | e_j0.c | 70 one = 1.0, variable 93 if(ix>=0x7ff00000) return one/(x*x); in __ieee754_j0() 117 if(huge+x>one) { /* raise inexact if x != 0 */ in __ieee754_j0() 118 if(ix<0x3e400000) return one; /* |x|<2**-27 */ in __ieee754_j0() 119 else return one - 0.25*x*x; in __ieee754_j0() 124 s = one+z*(S01+z*(S02+z*(S03+z*S04))); in __ieee754_j0() 126 return one + z*(-0.25+(r/s)); in __ieee754_j0() 129 return((one+u)*(one-u)+z*(r/s)); in __ieee754_j0() 155 if(ix>=0x7ff00000) return one/(x+x*x); in __ieee754_y0() 156 if((ix|lx)==0) return -one/zero; in __ieee754_y0() [all …]
|
D | e_sinh.c | 39 static const double one = 1.0, shuge = 1.0e307; variable 60 if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */ in __ieee754_sinh() 62 if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one)); in __ieee754_sinh() 63 return h*(t+t/(t+one)); in __ieee754_sinh()
|
D | k_cos.c | 61 one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ variable 77 w = one-hz; in __kernel_cos() 78 return w + (((one-w)-hz) + (z*r-x*y)); in __kernel_cos()
|
D | s_expm1.c | 116 one = 1.0, variable 156 return tiny-one; /* return -1 */ in expm1() 185 r1 = one+hxs*(Q1+hxs*(Q2+hxs*(Q3+hxs*(Q4+hxs*Q5)))); in expm1() 195 else return one+2.0*(x-e); in expm1() 198 y = one-(e-x); in expm1() 201 return y-one; in expm1() 203 t = one; in expm1() 214 y += one; in expm1()
|
D | s_expm1f.c | 24 one = 1.0, variable 61 return tiny-one; /* return -1 */ in expm1f() 90 r1 = one+hxs*(Q1+hxs*(Q2+hxs*(Q3+hxs*(Q4+hxs*Q5)))); in expm1f() 100 else return one+(float)2.0*(x-e); in expm1f() 103 y = one-(e-x); in expm1f() 106 return y-one; in expm1f() 108 t = one; in expm1f() 119 y += one; in expm1f()
|
D | e_atanhf.c | 23 static const float one = 1.0, huge = 1e30; variable 42 t = (float)0.5*log1pf(t+t*x/(one-x)); in __ieee754_atanhf() 44 t = (float)0.5*log1pf((x+x)/(one-x)); in __ieee754_atanhf()
|
D | e_atanh.c | 40 static const double one = 1.0, huge = 1e300; variable 59 t = 0.5*log1p(t+t*x/(one-x)); in __ieee754_atanh() 61 t = 0.5*log1p((x+x)/(one-x)); in __ieee754_atanh()
|
D | e_j1.c | 70 one = 1.0, variable 94 if(ix>=0x7ff00000) return one/x; in __ieee754_j1() 119 if(huge+x>one) return 0.5*x;/* inexact if x!=0 necessary */ in __ieee754_j1() 123 s = one+z*(s01+z*(s02+z*(s03+z*(s04+z*s05)))); in __ieee754_j1() 152 if(ix>=0x7ff00000) return one/(x+x*x); in __ieee754_y1() 153 if((ix|lx)==0) return -one/zero; in __ieee754_y1() 188 v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4])))); in __ieee754_y1() 189 return(x*(u/v) + tpi*(__ieee754_j1(x)*__ieee754_log(x)-one/x)); in __ieee754_y1() 277 z = one/(x*x); in pone() 279 s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4])))); in pone() [all …]
|
D | e_j1f.c | 28 one = 1.0, variable 52 if(ix>=0x7f800000) return one/x; in __ieee754_j1f() 77 if(huge+x>one) return (float)0.5*x;/* inexact if x!=0 necessary */ in __ieee754_j1f() 81 s = one+z*(s01+z*(s02+z*(s03+z*(s04+z*s05)))); in __ieee754_j1f() 110 if(ix>=0x7f800000) return one/(x+x*x); in __ieee754_y1f() 111 if(ix==0) return -one/zero; in __ieee754_y1f() 146 v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4])))); in __ieee754_y1f() 147 return(x*(u/v) + tpi*(__ieee754_j1f(x)*__ieee754_logf(x)-one/x)); in __ieee754_y1f() 235 z = one/(x*x); in ponef() 237 s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4])))); in ponef() [all …]
|
D | e_lgammaf_r.c | 26 one = 1.0000000000e+00, /* 0x3f800000 */ variable 129 case 4: y = __kernel_sindf(pi*(one-y)); break; in sin_pif() 150 if(ix==0) return one/zero; in __ieee754_lgammaf_r() 159 return one/zero; in __ieee754_lgammaf_r() 161 if(t==zero) return one/zero; /* -integer */ in __ieee754_lgammaf_r() 173 if(ix>=0x3f3b4a20) {y = one-x; i= 0;} in __ieee754_lgammaf_r() 174 else if(ix>=0x3e6d3308) {y= x-(tc-one); i=1;} in __ieee754_lgammaf_r() 180 else {y=x-one;i=2;} in __ieee754_lgammaf_r() 199 p2 = one+y*(v1+y*(v2+y*(v3+y*(v4+y*v5)))); in __ieee754_lgammaf_r() 208 q = one+y*(r1+y*(r2+y*(r3+y*(r4+y*(r5+y*r6))))); in __ieee754_lgammaf_r() [all …]
|
D | e_expf.c | 24 one = 1.0, variable 75 if(huge+x>one) return one+x;/* trigger inexact */ in __ieee754_expf() 82 if(k==0) return one-((x*c)/(c-(float)2.0)-x); in __ieee754_expf() 83 else y = one-((lo-(x*c)/((float)2.0-c))-hi); in __ieee754_expf()
|