/bionic/libm/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 | s_logbf.c | 29 int32_t ix; in logbf() local 30 GET_FLOAT_WORD(ix,x); in logbf() 31 ix &= 0x7fffffff; /* high |x| */ in logbf() 32 if(ix==0) return (float)-1.0/fabsf(x); in logbf() 33 if(ix>=0x7f800000) return x*x; in logbf() 34 if(ix<0x00800000) { in logbf() 36 GET_FLOAT_WORD(ix,x); in logbf() 37 ix &= 0x7fffffff; in logbf() 38 return (float) ((ix>>23)-127-25); in logbf() 40 return (float) ((ix>>23)-127); in logbf()
|
D | s_logb.c | 32 int32_t lx,ix; in logb() local 33 EXTRACT_WORDS(ix,lx,x); in logb() 34 ix &= 0x7fffffff; /* high |x| */ in logb() 35 if((ix|lx)==0) return -1.0/fabs(x); in logb() 36 if(ix>=0x7ff00000) return x*x; in logb() 37 if(ix<0x00100000) { in logb() 39 GET_HIGH_WORD(ix,x); in logb() 40 ix &= 0x7fffffff; in logb() 41 return (double) ((ix>>20)-1023-54); in logb() 43 return (double) ((ix>>20)-1023); in logb()
|
D | e_cosh.c | 48 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() 77 if (ix<0x408633CE || in __ieee754_cosh() 78 ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) { in __ieee754_cosh()
|
D | s_frexpf.c | 29 int32_t hx,ix; in frexpf() local 31 ix = 0x7fffffff&hx; in frexpf() 33 if(ix>=0x7f800000||(ix==0)) return x; /* 0,inf,nan */ in frexpf() 34 if (ix<0x00800000) { /* subnormal */ in frexpf() 37 ix = hx&0x7fffffff; in frexpf() 40 *eptr += (ix>>23)-126; in frexpf()
|
D | e_coshf.c | 29 int32_t ix; in __ieee754_coshf() local 31 GET_FLOAT_WORD(ix,x); in __ieee754_coshf() 32 ix &= 0x7fffffff; in __ieee754_coshf() 35 if(ix>=0x7f800000) return x*x; in __ieee754_coshf() 38 if(ix<0x3eb17218) { in __ieee754_coshf() 41 if (ix<0x39800000) return one; /* cosh(tiny) = 1 */ in __ieee754_coshf() 46 if (ix < 0x41100000) { in __ieee754_coshf() 52 if (ix < 0x42b17217) return half*__ieee754_expf(fabsf(x)); in __ieee754_coshf() 55 if (ix<=0x42b2d4fc) { in __ieee754_coshf()
|
D | s_tanf.c | 37 int32_t n, hx, ix; in tanf() local 40 ix = hx & 0x7fffffff; in tanf() 42 if(ix <= 0x3f490fda) { /* |x| ~<= pi/4 */ in tanf() 43 if(ix<0x39800000) /* |x| < 2**-12 */ in tanf() 47 if(ix<=0x407b53d1) { /* |x| ~<= 5*pi/4 */ in tanf() 48 if(ix<=0x4016cbe3) /* |x| ~<= 3pi/4 */ in tanf() 53 if(ix<=0x40e231d5) { /* |x| ~<= 9*pi/4 */ in tanf() 54 if(ix<=0x40afeddf) /* |x| ~<= 7*pi/4 */ in tanf() 61 else if (ix>=0x7f800000) return x-x; in tanf()
|
D | s_frexp.c | 39 int32_t hx, ix, lx; in frexp() local 41 ix = 0x7fffffff&hx; in frexp() 43 if(ix>=0x7ff00000||((ix|lx)==0)) return x; /* 0,inf,nan */ in frexp() 44 if (ix<0x00100000) { /* subnormal */ in frexp() 47 ix = hx&0x7fffffff; in frexp() 50 *eptr += (ix>>20)-1022; in frexp()
|
D | e_sinh.c | 45 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() 71 if (ix<0x408633CE || ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) { in __ieee754_sinh()
|
D | s_tan.c | 54 int32_t n, ix; in tan() local 57 GET_HIGH_WORD(ix,x); in tan() 60 ix &= 0x7fffffff; in tan() 61 if(ix <= 0x3fe921fb) { in tan() 62 if(ix<0x3e300000) /* x < 2**-28 */ in tan() 68 else if (ix>=0x7ff00000) return x-x; /* NaN */ in tan()
|
D | s_ilogb.c | 31 int32_t hx,lx,ix; in ilogb() local 40 for (ix = -1043; lx>0; lx<<=1) ix -=1; in ilogb() 42 for (ix = -1022,hx<<=11; hx>0; hx<<=1) ix -=1; in ilogb() 44 return ix; in ilogb()
|
D | e_sinhf.c | 29 int32_t ix,jx; in __ieee754_sinhf() local 32 ix = jx&0x7fffffff; in __ieee754_sinhf() 35 if(ix>=0x7f800000) return x+x; in __ieee754_sinhf() 40 if (ix < 0x41100000) { /* |x|<9 */ in __ieee754_sinhf() 41 if (ix<0x39800000) /* |x|<2**-12 */ in __ieee754_sinhf() 44 if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one)); in __ieee754_sinhf() 49 if (ix < 0x42b17217) return h*__ieee754_expf(fabsf(x)); in __ieee754_sinhf() 52 if (ix<=0x42b2d4fc) { in __ieee754_sinhf()
|
D | s_cosf.c | 39 int32_t n, hx, ix; in cosf() local 42 ix = hx & 0x7fffffff; in cosf() 44 if(ix <= 0x3f490fda) { /* |x| ~<= pi/4 */ in cosf() 45 if(ix<0x39800000) /* |x| < 2**-12 */ in cosf() 49 if(ix<=0x407b53d1) { /* |x| ~<= 5*pi/4 */ in cosf() 50 if(ix>0x4016cbe3) /* |x| ~> 3*pi/4 */ in cosf() 59 if(ix<=0x40e231d5) { /* |x| ~<= 9*pi/4 */ in cosf() 60 if(ix>0x40afeddf) /* |x| ~> 7*pi/4 */ in cosf() 71 else if (ix>=0x7f800000) return x-x; in cosf()
|
D | s_sinf.c | 39 int32_t n, hx, ix; in sinf() local 42 ix = hx & 0x7fffffff; in sinf() 44 if(ix <= 0x3f490fda) { /* |x| ~<= pi/4 */ in sinf() 45 if(ix<0x39800000) /* |x| < 2**-12 */ in sinf() 49 if(ix<=0x407b53d1) { /* |x| ~<= 5*pi/4 */ in sinf() 50 if(ix<=0x4016cbe3) { /* |x| ~<= 3pi/4 */ in sinf() 58 if(ix<=0x40e231d5) { /* |x| ~<= 9*pi/4 */ in sinf() 59 if(ix<=0x40afeddf) { /* |x| ~<= 7*pi/4 */ in sinf() 69 else if (ix>=0x7f800000) return x-x; in sinf()
|
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 | s_scalbnf.c | 34 int32_t k,ix; in scalbnf() local 35 GET_FLOAT_WORD(ix,x); in scalbnf() 36 k = (ix&0x7f800000)>>23; /* extract exponent */ in scalbnf() 38 if ((ix&0x7fffffff)==0) return x; /* +-0 */ in scalbnf() 40 GET_FLOAT_WORD(ix,x); in scalbnf() 41 k = ((ix&0x7f800000)>>23) - 25; in scalbnf() 48 {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} in scalbnf() 54 SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); in scalbnf()
|
D | e_atanhf.c | 31 int32_t hx,ix; in __ieee754_atanhf() local 33 ix = hx&0x7fffffff; in __ieee754_atanhf() 34 if (ix>0x3f800000) /* |x|>1 */ in __ieee754_atanhf() 36 if(ix==0x3f800000) in __ieee754_atanhf() 38 if(ix<0x31800000&&(huge+x)>zero) return x; /* x<2**-28 */ in __ieee754_atanhf() 39 SET_FLOAT_WORD(x,ix); in __ieee754_atanhf() 40 if(ix<0x3f000000) { /* x < 0.5 */ in __ieee754_atanhf()
|
D | s_cos.c | 55 int32_t n, ix; in cos() local 58 GET_HIGH_WORD(ix,x); in cos() 61 ix &= 0x7fffffff; in cos() 62 if(ix <= 0x3fe921fb) { in cos() 63 if(ix<0x3e400000) /* if x < 2**-27 */ in cos() 69 else if (ix>=0x7ff00000) return x-x; in cos()
|
D | s_sin.c | 55 int32_t n, ix; in sin() local 58 GET_HIGH_WORD(ix,x); in sin() 61 ix &= 0x7fffffff; in sin() 62 if(ix <= 0x3fe921fb) { in sin() 63 if(ix<0x3e400000) /* |x| < 2**-27 */ in sin() 69 else if (ix>=0x7ff00000) return x-x; in sin()
|
D | e_atanh.c | 47 int32_t hx,ix; in __ieee754_atanh() local 50 ix = hx&0x7fffffff; in __ieee754_atanh() 51 if ((ix|((lx|(-lx))>>31))>0x3ff00000) /* |x|>1 */ in __ieee754_atanh() 53 if(ix==0x3ff00000) in __ieee754_atanh() 55 if(ix<0x3e300000&&(huge+x)>zero) return x; /* x<2**-28 */ in __ieee754_atanh() 56 SET_HIGH_WORD(x,ix); in __ieee754_atanh() 57 if(ix<0x3fe00000) { /* x < 0.5 */ in __ieee754_atanh()
|
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() 101 if(ix<0x7fe00000) { /* make sure y+y not overflow */ in __ieee754_j1() 110 if(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(y); in __ieee754_j1() 118 if(ix<0x3e400000) { /* |x|<2**-27 */ in __ieee754_j1() 147 int32_t hx,ix,lx; in __ieee754_y1() local 150 ix = 0x7fffffff&hx; in __ieee754_y1() 152 if(ix>=0x7ff00000) return one/(x+x*x); in __ieee754_y1() [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() 100 if(ix<0x7fe00000) { /* make sure x+x not overflow */ in __ieee754_j0() 109 if(ix>0x48000000) z = (invsqrtpi*cc)/sqrt(x); in __ieee754_j0() 116 if(ix<0x3f200000) { /* |x| < 2**-13 */ in __ieee754_j0() 118 if(ix<0x3e400000) return one; /* |x|<2**-27 */ in __ieee754_j0() 125 if(ix < 0x3FF00000) { /* |x| < 1.00 */ in __ieee754_j0() 150 int32_t hx,ix,lx; in __ieee754_y0() local [all …]
|
D | e_j1f.c | 48 int32_t hx,ix; in __ieee754_j1f() local 51 ix = hx&0x7fffffff; in __ieee754_j1f() 52 if(ix>=0x7f800000) return one/x; in __ieee754_j1f() 54 if(ix >= 0x40000000) { /* |x| >= 2.0 */ in __ieee754_j1f() 59 if(ix<0x7f000000) { /* make sure y+y not overflow */ in __ieee754_j1f() 76 if(ix<0x32000000) { /* |x|<2**-27 */ in __ieee754_j1f() 105 int32_t hx,ix; in __ieee754_y1f() local 108 ix = 0x7fffffff&hx; in __ieee754_y1f() 110 if(ix>=0x7f800000) return one/(x+x*x); in __ieee754_y1f() 111 if(ix==0) return -one/zero; in __ieee754_y1f() [all …]
|
D | e_j0f.c | 47 int32_t hx,ix; in __ieee754_j0f() local 50 ix = hx&0x7fffffff; in __ieee754_j0f() 51 if(ix>=0x7f800000) return one/(x*x); in __ieee754_j0f() 53 if(ix >= 0x40000000) { /* |x| >= 2.0 */ in __ieee754_j0f() 58 if(ix<0x7f000000) { /* make sure x+x not overflow */ in __ieee754_j0f() 74 if(ix<0x39000000) { /* |x| < 2**-13 */ in __ieee754_j0f() 76 if(ix<0x32000000) return one; /* |x|<2**-27 */ in __ieee754_j0f() 83 if(ix < 0x3F800000) { /* |x| < 1.00 */ in __ieee754_j0f() 108 int32_t hx,ix; in __ieee754_y0f() local 111 ix = hx&0x7fffffff; in __ieee754_y0f() [all …]
|
D | s_atan.c | 76 int32_t ix,hx,id; in atan() local 79 ix = hx&0x7fffffff; in atan() 80 if(ix>=0x44100000) { /* if |x| >= 2^66 */ in atan() 83 if(ix>0x7ff00000|| in atan() 84 (ix==0x7ff00000&&(low!=0))) in atan() 88 } if (ix < 0x3fdc0000) { /* |x| < 0.4375 */ in atan() 89 if (ix < 0x3e200000) { /* |x| < 2^-29 */ in atan() 95 if (ix < 0x3ff30000) { /* |x| < 1.1875 */ in atan() 96 if (ix < 0x3fe60000) { /* 7/16 <=|x|<11/16 */ in atan() 102 if (ix < 0x40038000) { /* |x| < 2.4375 */ in atan()
|