/bionic/libm/src/ |
D | e_fmodf.c | 34 int32_t n,hx,hy,hz,ix,iy,sx,i; in __ieee754_fmodf() local 36 GET_FLOAT_WORD(hx,x); in __ieee754_fmodf() 38 sx = hx&0x80000000; /* sign of x */ in __ieee754_fmodf() 39 hx ^=sx; /* |x| */ in __ieee754_fmodf() 43 if(hy==0||(hx>=0x7f800000)|| /* y=0,or x not finite */ in __ieee754_fmodf() 46 if(hx<hy) return x; /* |x|<|y| return x */ in __ieee754_fmodf() 47 if(hx==hy) in __ieee754_fmodf() 51 if(hx<0x00800000) { /* subnormal x */ in __ieee754_fmodf() 52 for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1; in __ieee754_fmodf() 53 } else ix = (hx>>23)-127; in __ieee754_fmodf() [all …]
|
D | s_ilogbf.c | 27 int32_t hx,ix; in ilogbf() local 29 GET_FLOAT_WORD(hx,x); in ilogbf() 30 hx &= 0x7fffffff; in ilogbf() 31 if(hx<0x00800000) { in ilogbf() 32 if(hx==0) in ilogbf() 35 for (ix = -126,hx<<=8; hx>0; hx<<=1) ix -=1; in ilogbf() 38 else if (hx<0x7f800000) return (hx>>23)-127; in ilogbf() 39 else if (hx>0x7f800000) return FP_ILOGBNAN; in ilogbf()
|
D | s_ilogb.c | 31 int32_t hx,lx,ix; in ilogb() local 33 EXTRACT_WORDS(hx,lx,x); in ilogb() 34 hx &= 0x7fffffff; in ilogb() 35 if(hx<0x00100000) { in ilogb() 36 if((hx|lx)==0) in ilogb() 39 if(hx==0) { in ilogb() 42 for (ix = -1022,hx<<=11; hx>0; hx<<=1) ix -=1; in ilogb() 46 else if (hx<0x7ff00000) return (hx>>20)-1023; in ilogb() 47 else if (hx>0x7ff00000 || lx!=0) return FP_ILOGBNAN; in ilogb()
|
D | s_remquof.c | 32 int32_t n,hx,hy,hz,ix,iy,sx,i; in remquof() local 35 GET_FLOAT_WORD(hx,x); in remquof() 37 sxy = (hx ^ hy) & 0x80000000; in remquof() 38 sx = hx&0x80000000; /* sign of x */ in remquof() 39 hx ^=sx; /* |x| */ in remquof() 43 if(hy==0||hx>=0x7f800000||hy>0x7f800000) /* y=0,NaN;or x not finite */ in remquof() 45 if(hx<hy) { in remquof() 48 } else if(hx==hy) { in remquof() 54 if(hx<0x00800000) { /* subnormal x */ in remquof() 55 for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1; in remquof() [all …]
|
D | e_fmod.c | 32 int32_t n,hx,hy,hz,ix,iy,sx,i; in __ieee754_fmod() local 35 EXTRACT_WORDS(hx,lx,x); in __ieee754_fmod() 37 sx = hx&0x80000000; /* sign of x */ in __ieee754_fmod() 38 hx ^=sx; /* |x| */ in __ieee754_fmod() 42 if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ in __ieee754_fmod() 45 if(hx<=hy) { in __ieee754_fmod() 46 if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */ in __ieee754_fmod() 52 if(hx<0x00100000) { /* subnormal x */ in __ieee754_fmod() 53 if(hx==0) { in __ieee754_fmod() 56 for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1; in __ieee754_fmod() [all …]
|
D | s_remquo.c | 32 int32_t n,hx,hy,hz,ix,iy,sx,i; in remquo() local 35 EXTRACT_WORDS(hx,lx,x); in remquo() 37 sxy = (hx ^ hy) & 0x80000000; in remquo() 38 sx = hx&0x80000000; /* sign of x */ in remquo() 39 hx ^=sx; /* |x| */ in remquo() 43 if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ in remquo() 46 if(hx<=hy) { in remquo() 47 if((hx<hy)||(lx<ly)) { in remquo() 58 if(hx<0x00100000) { /* subnormal x */ in remquo() 59 if(hx==0) { in remquo() [all …]
|
D | s_nextafterf.c | 27 int32_t hx,hy,ix,iy; in nextafterf() local 29 GET_FLOAT_WORD(hx,x); in nextafterf() 31 ix = hx&0x7fffffff; /* |x| */ in nextafterf() 43 if(hx>=0) { /* x > 0 */ in nextafterf() 44 if(hx>hy) { /* x > y, x -= ulp */ in nextafterf() 45 hx -= 1; in nextafterf() 47 hx += 1; in nextafterf() 50 if(hy>=0||hx>hy){ /* x < y, x -= ulp */ in nextafterf() 51 hx -= 1; in nextafterf() 53 hx += 1; in nextafterf() [all …]
|
D | e_log10f.c | 35 int32_t i,k,hx; in __ieee754_log10f() local 37 GET_FLOAT_WORD(hx,x); in __ieee754_log10f() 40 if (hx < 0x00800000) { /* x < 2**-126 */ in __ieee754_log10f() 41 if ((hx&0x7fffffff)==0) in __ieee754_log10f() 43 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ in __ieee754_log10f() 45 GET_FLOAT_WORD(hx,x); in __ieee754_log10f() 47 if (hx >= 0x7f800000) return x+x; in __ieee754_log10f() 48 k += (hx>>23)-127; in __ieee754_log10f() 50 hx = (hx&0x007fffff)|((0x7f-i)<<23); in __ieee754_log10f() 52 SET_FLOAT_WORD(x,hx); in __ieee754_log10f()
|
D | e_log10.c | 66 int32_t i,k,hx; in __ieee754_log10() local 69 EXTRACT_WORDS(hx,lx,x); in __ieee754_log10() 72 if (hx < 0x00100000) { /* x < 2**-1022 */ in __ieee754_log10() 73 if (((hx&0x7fffffff)|lx)==0) in __ieee754_log10() 75 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ in __ieee754_log10() 77 GET_HIGH_WORD(hx,x); in __ieee754_log10() 79 if (hx >= 0x7ff00000) return x+x; in __ieee754_log10() 80 k += (hx>>20)-1023; in __ieee754_log10() 82 hx = (hx&0x000fffff)|((0x3ff-i)<<20); in __ieee754_log10() 84 SET_HIGH_WORD(x,hx); in __ieee754_log10()
|
D | s_frexpf.c | 29 int32_t hx,ix; in frexpf() local 30 GET_FLOAT_WORD(hx,x); in frexpf() 31 ix = 0x7fffffff&hx; in frexpf() 36 GET_FLOAT_WORD(hx,x); in frexpf() 37 ix = hx&0x7fffffff; in frexpf() 41 hx = (hx&0x807fffff)|0x3f000000; in frexpf() 42 *(int*)&x = hx; in frexpf()
|
D | s_nextafter.c | 34 int32_t hx,hy,ix,iy; in nextafter() local 37 EXTRACT_WORDS(hx,lx,x); in nextafter() 39 ix = hx&0x7fffffff; /* |x| */ in nextafter() 51 if(hx>=0) { /* x > 0 */ in nextafter() 52 if(hx>hy||((hx==hy)&&(lx>ly))) { /* x > y, x -= ulp */ in nextafter() 53 if(lx==0) hx -= 1; in nextafter() 57 if(lx==0) hx += 1; in nextafter() 60 if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){/* x < y, x -= ulp */ in nextafter() 61 if(lx==0) hx -= 1; in nextafter() 65 if(lx==0) hx += 1; in nextafter() [all …]
|
D | s_frexp.c | 39 int32_t hx, ix, lx; in frexp() local 40 EXTRACT_WORDS(hx,lx,x); in frexp() 41 ix = 0x7fffffff&hx; in frexp() 46 GET_HIGH_WORD(hx,x); in frexp() 47 ix = hx&0x7fffffff; in frexp() 51 hx = (hx&0x800fffff)|0x3fe00000; in frexp() 52 SET_HIGH_WORD(x,hx); in frexp()
|
D | e_acoshf.c | 31 int32_t hx; in __ieee754_acoshf() local 32 GET_FLOAT_WORD(hx,x); in __ieee754_acoshf() 33 if(hx<0x3f800000) { /* x < 1 */ in __ieee754_acoshf() 35 } else if(hx >=0x4d800000) { /* x > 2**28 */ in __ieee754_acoshf() 36 if(hx >=0x7f800000) { /* x is inf of NaN */ in __ieee754_acoshf() 40 } else if (hx==0x3f800000) { in __ieee754_acoshf() 42 } else if (hx > 0x40000000) { /* 2**28 > x > 2 */ in __ieee754_acoshf()
|
D | s_nexttowardf.c | 29 int32_t hx,ix; in nexttowardf() local 31 GET_FLOAT_WORD(hx,x); in nexttowardf() 32 ix = hx&0x7fffffff; /* |x| */ in nexttowardf() 45 if(hx>=0 ^ x < y) /* x -= ulp */ in nexttowardf() 46 hx -= 1; in nexttowardf() 48 hx += 1; in nexttowardf() 49 ix = hx&0x7f800000; in nexttowardf() 54 SET_FLOAT_WORD(y,hx); in nexttowardf() 58 SET_FLOAT_WORD(x,hx); in nexttowardf()
|
D | e_acosh.c | 44 int32_t hx; in __ieee754_acosh() local 46 EXTRACT_WORDS(hx,lx,x); in __ieee754_acosh() 47 if(hx<0x3ff00000) { /* x < 1 */ in __ieee754_acosh() 49 } else if(hx >=0x41b00000) { /* x > 2**28 */ in __ieee754_acosh() 50 if(hx >=0x7ff00000) { /* x is inf of NaN */ in __ieee754_acosh() 54 } else if(((hx-0x3ff00000)|lx)==0) { in __ieee754_acosh() 56 } else if (hx > 0x40000000) { /* 2**28 > x > 2 */ in __ieee754_acosh()
|
D | s_nexttoward.c | 38 int32_t hx,ix; in nexttoward() local 41 EXTRACT_WORDS(hx,lx,x); in nexttoward() 42 ix = hx&0x7fffffff; /* |x| */ in nexttoward() 55 if(hx>0.0 ^ x < y) { /* x -= ulp */ in nexttoward() 56 if(lx==0) hx -= 1; in nexttoward() 60 if(lx==0) hx += 1; in nexttoward() 62 ix = hx&0x7ff00000; in nexttoward() 67 INSERT_WORDS(y,hx,lx); in nexttoward() 71 INSERT_WORDS(x,hx,lx); in nexttoward()
|
D | e_log.c | 90 int32_t k,hx,i,j; in __ieee754_log() local 93 EXTRACT_WORDS(hx,lx,x); in __ieee754_log() 96 if (hx < 0x00100000) { /* x < 2**-1022 */ in __ieee754_log() 97 if (((hx&0x7fffffff)|lx)==0) in __ieee754_log() 99 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ in __ieee754_log() 101 GET_HIGH_WORD(hx,x); in __ieee754_log() 103 if (hx >= 0x7ff00000) return x+x; in __ieee754_log() 104 k += (hx>>20)-1023; in __ieee754_log() 105 hx &= 0x000fffff; in __ieee754_log() 106 i = (hx+0x95f64)&0x100000; in __ieee754_log() [all …]
|
D | e_remainderf.c | 29 int32_t hx,hp; in __ieee754_remainderf() local 33 GET_FLOAT_WORD(hx,x); in __ieee754_remainderf() 35 sx = hx&0x80000000; in __ieee754_remainderf() 37 hx &= 0x7fffffff; in __ieee754_remainderf() 41 if((hx>=0x7f800000)|| /* x not finite */ in __ieee754_remainderf() 47 if ((hx-hp)==0) return zero*x; in __ieee754_remainderf() 62 GET_FLOAT_WORD(hx,x); in __ieee754_remainderf() 63 SET_FLOAT_WORD(x,hx^sx); in __ieee754_remainderf()
|
D | s_tanf.c | 37 int32_t n, hx, ix; in tanf() local 39 GET_FLOAT_WORD(hx,x); in tanf() 40 ix = hx & 0x7fffffff; in tanf() 49 return __kernel_tandf(x + (hx>0 ? -t1pio2 : t1pio2), -1); in tanf() 51 return __kernel_tandf(x + (hx>0 ? -t2pio2 : t2pio2), 1); in tanf() 55 return __kernel_tandf(x + (hx>0 ? -t3pio2 : t3pio2), -1); in tanf() 57 return __kernel_tandf(x + (hx>0 ? -t4pio2 : t4pio2), 1); in tanf()
|
D | e_remainder.c | 36 int32_t hx,hp; in __ieee754_remainder() local 40 EXTRACT_WORDS(hx,lx,x); in __ieee754_remainder() 42 sx = hx&0x80000000; in __ieee754_remainder() 44 hx &= 0x7fffffff; in __ieee754_remainder() 48 if((hx>=0x7ff00000)|| /* x not finite */ in __ieee754_remainder() 55 if (((hx-hp)|(lx-lp))==0) return zero*x; in __ieee754_remainder() 70 GET_HIGH_WORD(hx,x); in __ieee754_remainder() 71 SET_HIGH_WORD(x,hx^sx); in __ieee754_remainder()
|
D | s_cbrtf.c | 42 int32_t hx; in cbrtf() local 46 GET_FLOAT_WORD(hx,x); in cbrtf() 47 sign=hx&0x80000000; /* sign= sign(x) */ in cbrtf() 48 hx ^=sign; in cbrtf() 49 if(hx>=0x7f800000) return(x+x); /* cbrt(NaN,INF) is itself */ in cbrtf() 50 if(hx==0) in cbrtf() 54 if(hx<0x00800000) { /* subnormal number */ in cbrtf() 60 SET_FLOAT_WORD(t,sign|(hx/3+B1)); in cbrtf()
|
D | s_scalbn.c | 39 int32_t k,hx,lx; in scalbn() local 40 EXTRACT_WORDS(hx,lx,x); in scalbn() 41 k = (hx&0x7ff00000)>>20; /* extract exponent */ in scalbn() 43 if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */ in scalbn() 45 GET_HIGH_WORD(hx,x); in scalbn() 46 k = ((hx&0x7ff00000)>>20) - 54; in scalbn() 53 {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} in scalbn() 59 SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); in scalbn()
|
D | s_finite.c | 27 int32_t hx; in finite() local 28 GET_HIGH_WORD(hx,x); in finite() 29 return (int)((u_int32_t)((hx&0x7fffffff)-0x7ff00000)>>31); in finite()
|
D | s_cosf.c | 39 int32_t n, hx, ix; in cosf() local 41 GET_FLOAT_WORD(hx,x); in cosf() 42 ix = hx & 0x7fffffff; in cosf() 51 return -__kernel_cosdf(x + (hx > 0 ? -c2pio2 : c2pio2)); in cosf() 53 if(hx>0) in cosf() 61 return __kernel_cosdf(x + (hx > 0 ? -c4pio2 : c4pio2)); in cosf() 63 if(hx>0) in cosf()
|
D | s_sinf.c | 39 int32_t n, hx, ix; in sinf() local 41 GET_FLOAT_WORD(hx,x); in sinf() 42 ix = hx & 0x7fffffff; in sinf() 51 if(hx>0) in sinf() 56 return __kernel_sindf((hx > 0 ? s2pio2 : -s2pio2) - x); in sinf() 60 if(hx>0) in sinf() 65 return __kernel_sindf(x + (hx > 0 ? -s4pio2 : s4pio2)); in sinf()
|