Home
last modified time | relevance | path

Searched refs:hx (Results 1 – 25 of 94) sorted by relevance

1234

/bionic/libm/upstream-freebsd/lib/msun/src/
De_fmodf.c33 int32_t n,hx,hy,hz,ix,iy,sx,i; in fmodf() local
35 GET_FLOAT_WORD(hx,x); in fmodf()
37 sx = hx&0x80000000; /* sign of x */ in fmodf()
38 hx ^=sx; /* |x| */ in fmodf()
42 if(hy==0||(hx>=0x7f800000)|| /* y=0,or x not finite */ in fmodf()
45 if(hx<hy) return x; /* |x|<|y| return x */ in fmodf()
46 if(hx==hy) in fmodf()
50 if(hx<0x00800000) { /* subnormal x */ in fmodf()
51 for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1; in fmodf()
52 } else ix = (hx>>23)-127; in fmodf()
[all …]
De_fmod.c33 int32_t n,hx,hy,hz,ix,iy,sx,i; in fmod() local
36 EXTRACT_WORDS(hx,lx,x); in fmod()
38 sx = hx&0x80000000; /* sign of x */ in fmod()
39 hx ^=sx; /* |x| */ in fmod()
43 if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ in fmod()
46 if(hx<=hy) { in fmod()
47 if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */ in fmod()
53 if(hx<0x00100000) { /* subnormal x */ in fmod()
54 if(hx==0) { in fmod()
57 for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1; in fmod()
[all …]
Ds_remquo.c34 int32_t n,hx,hy,hz,ix,iy,sx,i; in remquo() local
37 EXTRACT_WORDS(hx,lx,x); in remquo()
39 sxy = (hx ^ hy) & 0x80000000; in remquo()
40 sx = hx&0x80000000; /* sign of x */ in remquo()
41 hx ^=sx; /* |x| */ in remquo()
45 if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ in remquo()
48 if(hx<=hy) { in remquo()
49 if((hx<hy)||(lx<ly)) { in remquo()
60 if(hx<0x00100000) { /* subnormal x */ in remquo()
61 if(hx==0) { in remquo()
[all …]
Ds_remquof.c32 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 …]
Ds_ilogb.c30 int32_t hx,lx,ix; in ilogb() local
32 EXTRACT_WORDS(hx,lx,x); in ilogb()
33 hx &= 0x7fffffff; in ilogb()
34 if(hx<0x00100000) { in ilogb()
35 if((hx|lx)==0) in ilogb()
38 if(hx==0) { in ilogb()
41 for (ix = -1022,hx<<=11; hx>0; hx<<=1) ix -=1; in ilogb()
45 else if (hx<0x7ff00000) return (hx>>20)-1023; in ilogb()
46 else if (hx>0x7ff00000 || lx!=0) return FP_ILOGBNAN; in ilogb()
Ds_ilogbf.c26 int32_t hx,ix; in ilogbf() local
28 GET_FLOAT_WORD(hx,x); in ilogbf()
29 hx &= 0x7fffffff; in ilogbf()
30 if(hx<0x00800000) { in ilogbf()
31 if(hx==0) in ilogbf()
34 for (ix = -126,hx<<=8; hx>0; hx<<=1) ix -=1; in ilogbf()
37 else if (hx<0x7f800000) return (hx>>23)-127; in ilogbf()
38 else if (hx>0x7f800000) return FP_ILOGBNAN; in ilogbf()
Ds_nextafterf.c26 int32_t hx,hy,ix,iy; in nextafterf() local
28 GET_FLOAT_WORD(hx,x); in nextafterf()
30 ix = hx&0x7fffffff; /* |x| */ in nextafterf()
42 if(hx>=0) { /* x > 0 */ in nextafterf()
43 if(hx>hy) { /* x > y, x -= ulp */ in nextafterf()
44 hx -= 1; in nextafterf()
46 hx += 1; in nextafterf()
49 if(hy>=0||hx>hy){ /* x < y, x -= ulp */ in nextafterf()
50 hx -= 1; in nextafterf()
52 hx += 1; in nextafterf()
[all …]
Ds_nextafter.c32 int32_t hx,hy,ix,iy; in nextafter() local
35 EXTRACT_WORDS(hx,lx,x); in nextafter()
37 ix = hx&0x7fffffff; /* |x| */ in nextafter()
49 if(hx>=0) { /* x > 0 */ in nextafter()
50 if(hx>hy||((hx==hy)&&(lx>ly))) { /* x > y, x -= ulp */ in nextafter()
51 if(lx==0) hx -= 1; in nextafter()
55 if(lx==0) hx += 1; in nextafter()
58 if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){/* x < y, x -= ulp */ in nextafter()
59 if(lx==0) hx -= 1; in nextafter()
63 if(lx==0) hx += 1; in nextafter()
[all …]
De_log2f.c35 int32_t i,k,hx; in log2f() local
37 GET_FLOAT_WORD(hx,x); in log2f()
40 if (hx < 0x00800000) { /* x < 2**-126 */ in log2f()
41 if ((hx&0x7fffffff)==0) in log2f()
43 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ in log2f()
45 GET_FLOAT_WORD(hx,x); in log2f()
47 if (hx >= 0x7f800000) return x+x; in log2f()
48 if (hx == 0x3f800000) in log2f()
50 k += (hx>>23)-127; in log2f()
51 hx &= 0x007fffff; in log2f()
[all …]
De_log10f.c37 int32_t i,k,hx; in log10f() local
39 GET_FLOAT_WORD(hx,x); in log10f()
42 if (hx < 0x00800000) { /* x < 2**-126 */ in log10f()
43 if ((hx&0x7fffffff)==0) in log10f()
45 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ in log10f()
47 GET_FLOAT_WORD(hx,x); in log10f()
49 if (hx >= 0x7f800000) return x+x; in log10f()
50 if (hx == 0x3f800000) in log10f()
52 k += (hx>>23)-127; in log10f()
53 hx &= 0x007fffff; in log10f()
[all …]
De_log2.c45 int32_t i,k,hx; in log2() local
48 EXTRACT_WORDS(hx,lx,x); in log2()
51 if (hx < 0x00100000) { /* x < 2**-1022 */ in log2()
52 if (((hx&0x7fffffff)|lx)==0) in log2()
54 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ in log2()
56 GET_HIGH_WORD(hx,x); in log2()
58 if (hx >= 0x7ff00000) return x+x; in log2()
59 if (hx == 0x3ff00000 && lx == 0) in log2()
61 k += (hx>>20)-1023; in log2()
62 hx &= 0x000fffff; in log2()
[all …]
De_fmodl.c43 #define SET_NBIT(hx) ((hx) | (1ULL << LDBL_MANH_SIZE)) argument
46 #define SET_NBIT(hx) (hx) argument
68 int64_t hx,hz; /* We need a carry bit even if LDBL_MANH_SIZE is 32. */ in fmodl() local
112 hx = SET_NBIT(ux.bits.manh); in fmodl()
121 hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1; in fmodl()
122 if(hz<0){hx = hx+hx+(lx>>MANL_SHIFT); lx = lx+lx;} in fmodl()
126 hx = hz+hz+(lz>>MANL_SHIFT); lx = lz+lz; in fmodl()
129 hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1; in fmodl()
130 if(hz>=0) {hx=hz;lx=lz;} in fmodl()
133 if((hx|lx)==0) /* return sign(x)*0 */ in fmodl()
[all …]
De_log.c92 int32_t k,hx,i,j; in log() local
95 EXTRACT_WORDS(hx,lx,x); in log()
98 if (hx < 0x00100000) { /* x < 2**-1022 */ in log()
99 if (((hx&0x7fffffff)|lx)==0) in log()
101 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ in log()
103 GET_HIGH_WORD(hx,x); in log()
105 if (hx >= 0x7ff00000) return x+x; in log()
106 k += (hx>>20)-1023; in log()
107 hx &= 0x000fffff; in log()
108 i = (hx+0x95f64)&0x100000; in log()
[all …]
De_log10.c45 int32_t i,k,hx; in log10() local
48 EXTRACT_WORDS(hx,lx,x); in log10()
51 if (hx < 0x00100000) { /* x < 2**-1022 */ in log10()
52 if (((hx&0x7fffffff)|lx)==0) in log10()
54 if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ in log10()
56 GET_HIGH_WORD(hx,x); in log10()
58 if (hx >= 0x7ff00000) return x+x; in log10()
59 if (hx == 0x3ff00000 && lx == 0) in log10()
61 k += (hx>>20)-1023; in log10()
62 hx &= 0x000fffff; in log10()
[all …]
De_remainderf.c28 int32_t hx,hp; in remainderf() local
32 GET_FLOAT_WORD(hx,x); in remainderf()
34 sx = hx&0x80000000; in remainderf()
36 hx &= 0x7fffffff; in remainderf()
40 (hx>=0x7f800000)|| /* x not finite */ in remainderf()
46 if ((hx-hp)==0) return zero*x; in remainderf()
61 GET_FLOAT_WORD(hx,x); in remainderf()
62 if ((hx&0x7fffffff)==0) hx = 0; in remainderf()
63 SET_FLOAT_WORD(x,hx^sx); in remainderf()
Ds_frexpf.c28 int32_t hx,ix; in frexpf() local
29 GET_FLOAT_WORD(hx,x); in frexpf()
30 ix = 0x7fffffff&hx; in frexpf()
35 GET_FLOAT_WORD(hx,x); in frexpf()
36 ix = hx&0x7fffffff; in frexpf()
40 hx = (hx&0x807fffff)|0x3f000000; in frexpf()
41 SET_FLOAT_WORD(x,hx); in frexpf()
Ds_remquol.c43 #define SET_NBIT(hx) ((hx) | (1ULL << LDBL_MANH_SIZE)) argument
46 #define SET_NBIT(hx) (hx) argument
71 int64_t hx,hz; /* We need a carry bit even if LDBL_MANH_SIZE is 32. */ in remquol() local
120 hx = SET_NBIT(ux.bits.manh); in remquol()
129 hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1; in remquol()
130 if(hz<0){hx = hx+hx+(lx>>MANL_SHIFT); lx = lx+lx;} in remquol()
131 else {hx = hz+hz+(lz>>MANL_SHIFT); lx = lz+lz; q++;} in remquol()
134 hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1; in remquol()
135 if(hz>=0) {hx=hz;lx=lz;q++;} in remquol()
138 if((hx|lx)==0) { /* return sign(x)*0 */ in remquol()
[all …]
De_remainder.c37 int32_t hx,hp; in remainder() local
41 EXTRACT_WORDS(hx,lx,x); in remainder()
43 sx = hx&0x80000000; in remainder()
45 hx &= 0x7fffffff; in remainder()
49 (hx>=0x7ff00000)|| /* x not finite */ in remainder()
56 if (((hx-hp)|(lx-lp))==0) return zero*x; in remainder()
71 GET_HIGH_WORD(hx,x); in remainder()
72 if ((hx&0x7fffffff)==0) hx = 0; in remainder()
73 SET_HIGH_WORD(x,hx^sx); in remainder()
Ds_frexp.c37 int32_t hx, ix, lx; in frexp() local
38 EXTRACT_WORDS(hx,lx,x); in frexp()
39 ix = 0x7fffffff&hx; in frexp()
44 GET_HIGH_WORD(hx,x); in frexp()
45 ix = hx&0x7fffffff; in frexp()
49 hx = (hx&0x800fffff)|0x3fe00000; in frexp()
50 SET_HIGH_WORD(x,hx); in frexp()
Ds_nexttowardf.c28 int32_t hx,ix; in nexttowardf() local
30 GET_FLOAT_WORD(hx,x); in nexttowardf()
31 ix = hx&0x7fffffff; /* |x| */ in nexttowardf()
44 if(hx>=0 ^ x < y) /* x -= ulp */ in nexttowardf()
45 hx -= 1; in nexttowardf()
47 hx += 1; in nexttowardf()
48 ix = hx&0x7f800000; in nexttowardf()
53 SET_FLOAT_WORD(x,hx); in nexttowardf()
57 SET_FLOAT_WORD(x,hx); in nexttowardf()
Ds_nexttoward.c37 int32_t hx,ix; in nexttoward() local
40 EXTRACT_WORDS(hx,lx,x); in nexttoward()
41 ix = hx&0x7fffffff; /* |x| */ in nexttoward()
54 if(hx>0.0 ^ x < y) { /* x -= ulp */ in nexttoward()
55 if(lx==0) hx -= 1; in nexttoward()
59 if(lx==0) hx += 1; in nexttoward()
61 ix = hx&0x7ff00000; in nexttoward()
66 INSERT_WORDS(x,hx,lx); in nexttoward()
70 INSERT_WORDS(x,hx,lx); in nexttoward()
Ds_erff.c83 int32_t hx,ix,i; in erff() local
85 GET_FLOAT_WORD(hx,x); in erff()
86 ix = hx&0x7fffffff; in erff()
88 i = ((u_int32_t)hx>>31)<<1; in erff()
108 if(hx>=0) return erx + P/Q; else return -erx - P/Q; in erff()
111 if(hx>=0) return one-tiny; else return tiny-one; in erff()
122 SET_FLOAT_WORD(z,hx&0xffffe000); in erff()
124 if(hx>=0) return one-r/x; else return r/x-one; in erff()
130 int32_t hx,ix; in erfcf() local
132 GET_FLOAT_WORD(hx,x); in erfcf()
[all …]
De_expf.c50 u_int32_t hx; in expf() local
52 GET_FLOAT_WORD(hx,x); in expf()
53 xsb = (hx>>31)&1; /* sign bit of x */ in expf()
54 hx &= 0x7fffffff; /* high word of |x| */ in expf()
57 if(hx >= 0x42b17218) { /* if |x|>=88.721... */ in expf()
58 if(hx>0x7f800000) in expf()
60 if(hx==0x7f800000) in expf()
67 if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */ in expf()
68 if(hx < 0x3F851592) { /* and |x| < 1.5 ln2 */ in expf()
78 else if(hx < 0x39000000) { /* when |x|<2**-14 */ in expf()
Ds_cbrtf.c35 int32_t hx; in cbrtf() local
39 GET_FLOAT_WORD(hx,x); in cbrtf()
40 sign=hx&0x80000000; /* sign= sign(x) */ in cbrtf()
41 hx ^=sign; in cbrtf()
42 if(hx>=0x7f800000) return(x+x); /* cbrt(NaN,INF) is itself */ in cbrtf()
45 if(hx<0x00800000) { /* zero or subnormal? */ in cbrtf()
46 if(hx==0) in cbrtf()
53 SET_FLOAT_WORD(t,sign|(hx/3+B1)); in cbrtf()
De_acoshf.c30 int32_t hx; in acoshf() local
31 GET_FLOAT_WORD(hx,x); in acoshf()
32 if(hx<0x3f800000) { /* x < 1 */ in acoshf()
34 } else if(hx >=0x4d800000) { /* x > 2**28 */ in acoshf()
35 if(hx >=0x7f800000) { /* x is inf of NaN */ in acoshf()
39 } else if (hx==0x3f800000) { in acoshf()
41 } else if (hx > 0x40000000) { /* 2**28 > x > 2 */ in acoshf()

1234