/bionic/libm/upstream-freebsd/lib/msun/src/ |
D | e_sqrtf.c | 30 int32_t ix,s,q,m,t,i; in __ieee754_sqrtf() local 33 GET_FLOAT_WORD(ix,x); in __ieee754_sqrtf() 36 if((ix&0x7f800000)==0x7f800000) { in __ieee754_sqrtf() 41 if(ix<=0) { in __ieee754_sqrtf() 42 if((ix&(~sign))==0) return x;/* sqrt(+-0) = +-0 */ in __ieee754_sqrtf() 43 else if(ix<0) in __ieee754_sqrtf() 47 m = (ix>>23); in __ieee754_sqrtf() 49 for(i=0;(ix&0x00800000)==0;i++) ix<<=1; in __ieee754_sqrtf() 53 ix = (ix&0x007fffff)|0x00800000; in __ieee754_sqrtf() 55 ix += ix; in __ieee754_sqrtf() [all …]
|
D | e_j0f.c | 51 int32_t hx,ix; in __ieee754_j0f() local 54 ix = hx&0x7fffffff; in __ieee754_j0f() 55 if(ix>=0x7f800000) return one/(x*x); in __ieee754_j0f() 57 if(ix >= 0x40000000) { /* |x| >= 2.0 */ in __ieee754_j0f() 61 if(ix<0x7f000000) { /* Make sure x+x does not overflow. */ in __ieee754_j0f() 70 if(ix>0x58000000) z = (invsqrtpi*cc)/sqrtf(x); /* |x|>2**49 */ in __ieee754_j0f() 77 if(ix<0x3b000000) { /* |x| < 2**-9 */ in __ieee754_j0f() 79 if(ix<0x39800000) return one; /* |x|<2**-12 */ in __ieee754_j0f() 86 if(ix < 0x3F800000) { /* |x| < 1.00 */ in __ieee754_j0f() 111 int32_t hx,ix; in __ieee754_y0f() local [all …]
|
D | e_j0.c | 89 int32_t hx,ix; in __ieee754_j0() local 92 ix = hx&0x7fffffff; in __ieee754_j0() 93 if(ix>=0x7ff00000) return one/(x*x); in __ieee754_j0() 95 if(ix >= 0x40000000) { /* |x| >= 2.0 */ in __ieee754_j0() 99 if(ix<0x7fe00000) { /* Make sure x+x does not overflow. */ in __ieee754_j0() 108 if(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(x); in __ieee754_j0() 115 if(ix<0x3f200000) { /* |x| < 2**-13 */ in __ieee754_j0() 117 if(ix<0x3e400000) return one; /* |x|<2**-27 */ in __ieee754_j0() 124 if(ix < 0x3FF00000) { /* |x| < 1.00 */ in __ieee754_j0() 149 int32_t hx,ix,lx; in __ieee754_y0() local [all …]
|
D | e_j1.c | 90 int32_t hx,ix; in __ieee754_j1() local 93 ix = hx&0x7fffffff; in __ieee754_j1() 94 if(ix>=0x7ff00000) return one/x; in __ieee754_j1() 96 if(ix >= 0x40000000) { /* |x| >= 2.0 */ in __ieee754_j1() 100 if(ix<0x7fe00000) { /* make sure y+y not overflow */ in __ieee754_j1() 109 if(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(y); in __ieee754_j1() 117 if(ix<0x3e400000) { /* |x|<2**-27 */ in __ieee754_j1() 146 int32_t hx,ix,lx; in __ieee754_y1() local 149 ix = 0x7fffffff&hx; in __ieee754_y1() 155 if(ix>=0x7ff00000) return vone/(x+x*x); in __ieee754_y1() [all …]
|
D | e_j1f.c | 52 int32_t hx,ix; in __ieee754_j1f() local 55 ix = hx&0x7fffffff; in __ieee754_j1f() 56 if(ix>=0x7f800000) return one/x; in __ieee754_j1f() 58 if(ix >= 0x40000000) { /* |x| >= 2.0 */ in __ieee754_j1f() 62 if(ix<0x7f000000) { /* make sure y+y not overflow */ in __ieee754_j1f() 71 if(ix>0x58000000) z = (invsqrtpi*cc)/sqrtf(y); /* |x|>2**49 */ in __ieee754_j1f() 79 if(ix<0x39000000) { /* |x|<2**-13 */ in __ieee754_j1f() 108 int32_t hx,ix; in __ieee754_y1f() local 111 ix = 0x7fffffff&hx; in __ieee754_y1f() 112 if(ix>=0x7f800000) return vone/(x+x*x); in __ieee754_y1f() [all …]
|
D | s_logbf.c | 28 int32_t ix; in logbf() local 29 GET_FLOAT_WORD(ix,x); in logbf() 30 ix &= 0x7fffffff; /* high |x| */ in logbf() 31 if(ix==0) return (float)-1.0/fabsf(x); in logbf() 32 if(ix>=0x7f800000) return x*x; in logbf() 33 if(ix<0x00800000) { in logbf() 35 GET_FLOAT_WORD(ix,x); in logbf() 36 ix &= 0x7fffffff; in logbf() 37 return (float) ((ix>>23)-127-25); in logbf() 39 return (float) ((ix>>23)-127); in logbf()
|
D | s_logb.c | 33 int32_t lx,ix; in logb() local 34 EXTRACT_WORDS(ix,lx,x); in logb() 35 ix &= 0x7fffffff; /* high |x| */ in logb() 36 if((ix|lx)==0) return -1.0/fabs(x); in logb() 37 if(ix>=0x7ff00000) return x*x; in logb() 38 if(ix<0x00100000) { in logb() 40 GET_HIGH_WORD(ix,x); in logb() 41 ix &= 0x7fffffff; in logb() 42 return (double) ((ix>>20)-1023-54); in logb() 44 return (double) ((ix>>20)-1023); in logb()
|
D | e_logf.c | 39 int32_t k,ix,i,j; in __ieee754_logf() local 41 GET_FLOAT_WORD(ix,x); in __ieee754_logf() 44 if (ix < 0x00800000) { /* x < 2**-126 */ in __ieee754_logf() 45 if ((ix&0x7fffffff)==0) in __ieee754_logf() 47 if (ix<0) return (x-x)/zero; /* log(-#) = NaN */ in __ieee754_logf() 49 GET_FLOAT_WORD(ix,x); in __ieee754_logf() 51 if (ix >= 0x7f800000) return x+x; in __ieee754_logf() 52 k += (ix>>23)-127; in __ieee754_logf() 53 ix &= 0x007fffff; in __ieee754_logf() 54 i = (ix+(0x95f64<<3))&0x800000; in __ieee754_logf() [all …]
|
D | e_coshf.c | 28 int32_t ix; in __ieee754_coshf() local 30 GET_FLOAT_WORD(ix,x); in __ieee754_coshf() 31 ix &= 0x7fffffff; in __ieee754_coshf() 34 if(ix>=0x7f800000) return x*x; in __ieee754_coshf() 37 if(ix<0x3eb17218) { in __ieee754_coshf() 40 if (ix<0x39800000) return one; /* cosh(tiny) = 1 */ in __ieee754_coshf() 45 if (ix < 0x41100000) { in __ieee754_coshf() 51 if (ix < 0x42b17217) return half*__ieee754_expf(fabsf(x)); in __ieee754_coshf() 54 if (ix<=0x42b2d4fc) in __ieee754_coshf()
|
D | e_cosh.c | 49 int32_t ix; in __ieee754_cosh() local 52 GET_HIGH_WORD(ix,x); in __ieee754_cosh() 53 ix &= 0x7fffffff; in __ieee754_cosh() 56 if(ix>=0x7ff00000) return x*x; in __ieee754_cosh() 59 if(ix<0x3fd62e43) { in __ieee754_cosh() 62 if (ix<0x3c800000) return w; /* cosh(tiny) = 1 */ in __ieee754_cosh() 67 if (ix < 0x40360000) { in __ieee754_cosh() 73 if (ix < 0x40862E42) return half*__ieee754_exp(fabs(x)); in __ieee754_cosh() 76 if (ix<=0x408633CE) in __ieee754_cosh()
|
D | s_tanf.c | 40 int32_t n, hx, ix; in tanf() local 43 ix = hx & 0x7fffffff; in tanf() 45 if(ix <= 0x3f490fda) { /* |x| ~<= pi/4 */ in tanf() 46 if(ix<0x39800000) /* |x| < 2**-12 */ in tanf() 50 if(ix<=0x407b53d1) { /* |x| ~<= 5*pi/4 */ in tanf() 51 if(ix<=0x4016cbe3) /* |x| ~<= 3pi/4 */ in tanf() 56 if(ix<=0x40e231d5) { /* |x| ~<= 9*pi/4 */ in tanf() 57 if(ix<=0x40afeddf) /* |x| ~<= 7*pi/4 */ in tanf() 64 else if (ix>=0x7f800000) return x-x; in tanf()
|
D | s_erff.c | 83 int32_t hx,ix,i; in erff() local 86 ix = hx&0x7fffffff; in erff() 87 if(ix>=0x7f800000) { /* erff(nan)=nan */ in erff() 92 if(ix < 0x3f580000) { /* |x|<0.84375 */ in erff() 93 if(ix < 0x38800000) { /* |x|<2**-14 */ in erff() 94 if (ix < 0x04000000) /* |x|<0x1p-119 */ in erff() 104 if(ix < 0x3fa00000) { /* 0.84375 <= |x| < 1.25 */ in erff() 110 if (ix >= 0x40800000) { /* inf>|x|>=4 */ in erff() 115 if(ix< 0x4036db8c) { /* |x| < 2.85715 ~ 1/0.35 */ in erff() 130 int32_t hx,ix; in erfcf() local [all …]
|
D | e_rem_pio2.c | 59 int32_t e0,i,j,nx,n,ix,hx; in __ieee754_rem_pio2() local 63 ix = hx&0x7fffffff; in __ieee754_rem_pio2() 65 if(ix<=0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */ in __ieee754_rem_pio2() 68 if (ix <= 0x400f6a7a) { /* |x| ~<= 5pi/4 */ in __ieee754_rem_pio2() 69 if ((ix & 0xfffff) == 0x921fb) /* |x| ~= pi/2 or 2pi/2 */ in __ieee754_rem_pio2() 71 if (ix <= 0x4002d97c) { /* |x| ~<= 3pi/4 */ in __ieee754_rem_pio2() 97 if (ix <= 0x401c463b) { /* |x| ~<= 9pi/4 */ in __ieee754_rem_pio2() 98 if (ix <= 0x4015fdbc) { /* |x| ~<= 7pi/4 */ in __ieee754_rem_pio2() 99 if (ix == 0x4012d97c) /* |x| ~= 3pi/2 */ in __ieee754_rem_pio2() 113 if (ix == 0x401921fb) /* |x| ~= 4pi/2 */ in __ieee754_rem_pio2() [all …]
|
D | s_sinf.c | 42 int32_t n, hx, ix; in sinf() local 45 ix = hx & 0x7fffffff; in sinf() 47 if(ix <= 0x3f490fda) { /* |x| ~<= pi/4 */ in sinf() 48 if(ix<0x39800000) /* |x| < 2**-12 */ in sinf() 52 if(ix<=0x407b53d1) { /* |x| ~<= 5*pi/4 */ in sinf() 53 if(ix<=0x4016cbe3) { /* |x| ~<= 3pi/4 */ in sinf() 61 if(ix<=0x40e231d5) { /* |x| ~<= 9*pi/4 */ in sinf() 62 if(ix<=0x40afeddf) { /* |x| ~<= 7*pi/4 */ in sinf() 72 else if (ix>=0x7f800000) return x-x; in sinf()
|
D | s_cosf.c | 42 int32_t n, hx, ix; in cosf() local 45 ix = hx & 0x7fffffff; in cosf() 47 if(ix <= 0x3f490fda) { /* |x| ~<= pi/4 */ in cosf() 48 if(ix<0x39800000) /* |x| < 2**-12 */ in cosf() 52 if(ix<=0x407b53d1) { /* |x| ~<= 5*pi/4 */ in cosf() 53 if(ix>0x4016cbe3) /* |x| ~> 3*pi/4 */ in cosf() 62 if(ix<=0x40e231d5) { /* |x| ~<= 9*pi/4 */ in cosf() 63 if(ix>0x40afeddf) /* |x| ~> 7*pi/4 */ in cosf() 74 else if (ix>=0x7f800000) return x-x; in cosf()
|
D | e_pow.c | 106 int32_t hx,hy,ix,iy; in __ieee754_pow() local 111 ix = hx&0x7fffffff; iy = hy&0x7fffffff; in __ieee754_pow() 120 if(ix > 0x7ff00000 || ((ix==0x7ff00000)&&(lx!=0)) || in __ieee754_pow() 147 if(((ix-0x3ff00000)|lx)==0) in __ieee754_pow() 149 else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */ in __ieee754_pow() 167 if(ix==0x7ff00000||ix==0||ix==0x3ff00000){ in __ieee754_pow() 171 if(((ix-0x3ff00000)|yisint)==0) { in __ieee754_pow() 195 if(ix<=0x3fefffff) return (hy<0)? huge*huge:tiny*tiny; in __ieee754_pow() 196 if(ix>=0x3ff00000) return (hy>0)? huge*huge:tiny*tiny; in __ieee754_pow() 199 if(ix<0x3fefffff) return (hy<0)? s*huge*huge:s*tiny*tiny; in __ieee754_pow() [all …]
|
D | e_lgammaf_r.c | 127 int i,ix; in __ieee754_lgammaf_r() local 133 ix = hx&0x7fffffff; in __ieee754_lgammaf_r() 134 if(ix>=0x7f800000) return x*x; in __ieee754_lgammaf_r() 138 if(ix<0x32000000) { /* |x|<2**-27, return -log(|x|) */ in __ieee754_lgammaf_r() 139 if(ix==0) in __ieee754_lgammaf_r() 147 if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */ in __ieee754_lgammaf_r() 157 if (ix==0x3f800000||ix==0x40000000) r = 0; in __ieee754_lgammaf_r() 159 else if(ix<0x40000000) { in __ieee754_lgammaf_r() 160 if(ix<=0x3f666666) { /* lgamma(x) = lgamma(x+1)-log(x) */ in __ieee754_lgammaf_r() 162 if(ix>=0x3f3b4a20) {y = one-x; i= 0;} in __ieee754_lgammaf_r() [all …]
|
D | s_atan.c | 77 int32_t ix,hx,id; in atan() local 80 ix = hx&0x7fffffff; in atan() 81 if(ix>=0x44100000) { /* if |x| >= 2^66 */ in atan() 84 if(ix>0x7ff00000|| in atan() 85 (ix==0x7ff00000&&(low!=0))) in atan() 89 } if (ix < 0x3fdc0000) { /* |x| < 0.4375 */ in atan() 90 if (ix < 0x3e400000) { /* |x| < 2^-27 */ in atan() 96 if (ix < 0x3ff30000) { /* |x| < 1.1875 */ in atan() 97 if (ix < 0x3fe60000) { /* 7/16 <=|x|<11/16 */ in atan() 103 if (ix < 0x40038000) { /* |x| < 2.4375 */ in atan()
|
D | e_sinhf.c | 28 int32_t ix,jx; in __ieee754_sinhf() local 31 ix = jx&0x7fffffff; in __ieee754_sinhf() 34 if(ix>=0x7f800000) return x+x; in __ieee754_sinhf() 39 if (ix < 0x41100000) { /* |x|<9 */ in __ieee754_sinhf() 40 if (ix<0x39800000) /* |x|<2**-12 */ in __ieee754_sinhf() 43 if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one)); in __ieee754_sinhf() 48 if (ix < 0x42b17217) return h*__ieee754_expf(fabsf(x)); in __ieee754_sinhf() 51 if (ix<=0x42b2d4fc) in __ieee754_sinhf()
|
D | e_sinh.c | 46 int32_t ix,jx; in __ieee754_sinh() local 50 ix = jx&0x7fffffff; in __ieee754_sinh() 53 if(ix>=0x7ff00000) return x+x; in __ieee754_sinh() 58 if (ix < 0x40360000) { /* |x|<22 */ in __ieee754_sinh() 59 if (ix<0x3e300000) /* |x|<2**-28 */ in __ieee754_sinh() 62 if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one)); in __ieee754_sinh() 67 if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x)); in __ieee754_sinh() 70 if (ix<=0x408633CE) in __ieee754_sinh()
|
D | s_atanf.c | 52 int32_t ix,hx,id; in atanf() local 55 ix = hx&0x7fffffff; in atanf() 56 if(ix>=0x4c800000) { /* if |x| >= 2**26 */ in atanf() 57 if(ix>0x7f800000) in atanf() 61 } if (ix < 0x3ee00000) { /* |x| < 0.4375 */ in atanf() 62 if (ix < 0x39800000) { /* |x| < 2**-12 */ in atanf() 68 if (ix < 0x3f980000) { /* |x| < 1.1875 */ in atanf() 69 if (ix < 0x3f300000) { /* 7/16 <=|x|<11/16 */ in atanf() 75 if (ix < 0x401c0000) { /* |x| < 2.4375 */ in atanf()
|
D | s_scalbnf.c | 31 int32_t k,ix; in scalbnf() local 32 GET_FLOAT_WORD(ix,x); in scalbnf() 33 k = (ix&0x7f800000)>>23; /* extract exponent */ in scalbnf() 35 if ((ix&0x7fffffff)==0) return x; /* +-0 */ in scalbnf() 37 GET_FLOAT_WORD(ix,x); in scalbnf() 38 k = ((ix&0x7f800000)>>23) - 25; in scalbnf() 45 {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} in scalbnf() 53 SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); in scalbnf()
|
D | s_frexpf.c | 28 int32_t hx,ix; in frexpf() local 30 ix = 0x7fffffff&hx; in frexpf() 32 if(ix>=0x7f800000||(ix==0)) return x; /* 0,inf,nan */ in frexpf() 33 if (ix<0x00800000) { /* subnormal */ in frexpf() 36 ix = hx&0x7fffffff; in frexpf() 39 *eptr += (ix>>23)-126; in frexpf()
|
D | e_powf.c | 64 int32_t hx,hy,ix,iy,is; in __ieee754_powf() local 68 ix = hx&0x7fffffff; iy = hy&0x7fffffff; in __ieee754_powf() 77 if(ix > 0x7f800000 || in __ieee754_powf() 98 if (ix==0x3f800000) in __ieee754_powf() 100 else if (ix > 0x3f800000)/* (|x|>1)**+-inf = inf,0 */ in __ieee754_powf() 116 if(ix==0x7f800000||ix==0||ix==0x3f800000){ in __ieee754_powf() 120 if(((ix-0x3f800000)|yisint)==0) { in __ieee754_powf() 139 if(ix<0x3f7ffff8) return (hy<0)? sn*huge*huge:sn*tiny*tiny; in __ieee754_powf() 140 if(ix>0x3f800007) return (hy>0)? sn*huge*huge:sn*tiny*tiny; in __ieee754_powf() 155 if(ix<0x00800000) in __ieee754_powf() [all …]
|
D | s_frexp.c | 37 int32_t hx, ix, lx; in frexp() local 39 ix = 0x7fffffff&hx; in frexp() 41 if(ix>=0x7ff00000||((ix|lx)==0)) return x; /* 0,inf,nan */ in frexp() 42 if (ix<0x00100000) { /* subnormal */ in frexp() 45 ix = hx&0x7fffffff; in frexp() 48 *eptr += (ix>>20)-1022; in frexp()
|