/illumos-gate/usr/src/lib/libm/common/R/ |
H A D | atan2f.c | 254 int i, k, hx, hy, ix, iy, sign; in atan2f() local 262 hx = ix & ~0x80000000; in atan2f() 265 if (hy > hx) { in atan2f() 268 i = hx; in atan2f() 269 hx = hy; in atan2f() 298 if (hx >= 0x7f800000 || hx - hy >= 0x0c800000) { in atan2f() 299 if (hx >= 0x7f800000) { in atan2f() 300 if (hx > 0x7f800000) /* nan */ in atan2f() 317 hx = *(int *)&x; in atan2f() 323 k = (hy - hx + 0x3f800000) & 0xfff80000; in atan2f()
|
H A D | expf.c | 347 int hx, ix, n; in expf() local 349 hx = *(int *)&xf; in expf() 350 ix = hx & ~0x80000000; in expf() 362 if (hx == 0xff800000) in expf() 366 if (hx > 0) in expf() 373 if (hx > 0) in expf() 390 xf = (float)((w * p) * (hx < 0 ? q * EN[n - 0x79] : q)); in expf() 392 if ((unsigned)hx >= 0xc2800000u) { in expf() 393 if ((unsigned)hx >= 0xc2aeac50) { /* force underflow */ in expf()
|
H A D | logf.c | 118 int hx, ix, i, exp, iy; in logf() local 120 hx = *(int *)&x; in logf() 121 ix = hx & ~0x80000000; in logf() 124 return ((hx < 0)? x * 0.0f : x * x); in logf() 127 if (hx < 0x00800000) { /* negative, zero, or subnormal */ in logf() 128 if (hx <= 0) { in logf()
|
/illumos-gate/usr/src/lib/libm/common/complex/ |
H A D | k_cexp.c | 122 unsigned hx, lx; in __k_cexp() local 124 hx = HI_WORD(x); /* high word of x */ in __k_cexp() 126 xsb = (hx >> 31) & 1; /* sign bit of x */ in __k_cexp() 127 hx &= 0x7fffffff; /* high word of |x| */ in __k_cexp() 130 if (hx >= 0x40e86a00) { /* if |x| > 50000 */ in __k_cexp() 131 if (hx >= 0x7ff00000) { in __k_cexp() 133 if (((hx & 0xfffff) | lx) != 0) in __k_cexp() 145 if (hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */ in __k_cexp() 146 if (hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */ in __k_cexp() 159 } else if (hx < 0x3e300000) { /* when |x|<2**-28 */ in __k_cexp()
|
H A D | k_cexpl.c | 242 int hx, ix, j, k; in __k_cexpl() local 246 hx = HI_XWORD(x); in __k_cexpl() 247 ix = hx & 0x7fffffff; in __k_cexpl() 248 if (hx >= 0x7fff0000) in __k_cexpl() 250 if (((unsigned) hx) >= 0xffff0000) in __k_cexpl() 254 if (hx > 0) { in __k_cexpl() 255 if (hx > 0x401086a0) { /* x > 200000 */ in __k_cexpl()
|
/illumos-gate/usr/src/lib/libmvec/common/ |
H A D | __vsincosbig.c | 74 unsigned hx, xsb; in __vlibm_vsincos_big() local 77 hx = HI(x); in __vlibm_vsincos_big() 78 xsb = hx & 0x80000000; in __vlibm_vsincos_big() 79 hx &= ~0x80000000; in __vlibm_vsincos_big() 80 if (hx <= thresh || hx >= 0x7ff00000) in __vlibm_vsincos_big() 86 e0 = (hx >> 20) - 1046; in __vlibm_vsincos_big() 113 hx = HI(&ty[0]); in __vlibm_vsincos_big() 115 if (hx & 0x80000000) in __vlibm_vsincos_big() 119 hx &= ~0x80000000; in __vlibm_vsincos_big() 122 if (hx < 0x3fc40000) in __vlibm_vsincos_big() [all …]
|
H A D | __vrsqrt.c | 100 hx = HI(px); \ 120 int ax, lx, hx, n_n; in __vrsqrt() local 128 hx = HI(px); in __vrsqrt() 143 ax = hx & 0x7fffffff; in __vrsqrt() 151 else if (hx >= 0) /* X = denormal */ in __vrsqrt() 190 hx = HI(px); in __vrsqrt() 197 hx = HI(px); in __vrsqrt() 206 ax = hx & 0x7fffffff; in __vrsqrt() 214 else if (hx >= 0) /* X = denormal */ in __vrsqrt() 259 sqrt_exp0 = (0x5fe - (hx >> 21)) << 20; in __vrsqrt() [all …]
|
/illumos-gate/usr/src/lib/libm/common/m9x/ |
H A D | modf.c | 53 unsigned hx, s; in __modf() local 56 hx = xx.i[HIWORD] & ~0x80000000; in __modf() 58 if (hx >= 0x43300000) { /* x is NaN, infinite, or integral */ in __modf() 60 if (hx < 0x7ff00000 || (hx == 0x7ff00000 && in __modf() 68 if (hx < 0x3ff00000) { /* |x| < 1 */ in __modf() 77 if (hx < 0x41400000) { in __modf() 78 yy.i[HIWORD] = xx.i[HIWORD] & ~((1 << (0x413 - (hx >> 20))) - in __modf() 83 yy.i[LOWORD] = xx.i[LOWORD] & ~((1 << (0x433 - (hx >> 20))) - in __modf()
|
H A D | remquof.c | 58 int hx, ix, iy, iz, k, ny, nd, m, sq; in fmodquof() local 60 hx = *(int *) &x; in fmodquof() 61 ix = hx & 0x7fffffff; in fmodquof() 63 sq = (iy ^ hx) & is; /* sign of x/y */ in fmodquof() 166 *(int *) &w = is & hx; in fmodquof() 191 *(int *) &w = is & hx; in fmodquof() 207 *(int *) &w = (is & hx) | ix; in fmodquof() 215 int hx, hy, sx, sq; in remquof() local 220 sx = hx & is; /* sign of x */ in remquof() 222 hx ^= sx; /* |x| */ in remquof() [all …]
|
H A D | lround.c | 50 unsigned hx, sx, i; in lround() local 53 hx = xx.i[HIWORD] & ~0x80000000; in lround() 55 if (hx < 0x43300000) { /* |x| < 2^52 */ in lround() 56 if (hx < 0x3ff00000) { /* |x| < 1 */ in lround() 57 if (hx >= 0x3fe00000) in lround() 63 if (hx < 0x41300000) { in lround() 64 i = 1 << (0x412 - (hx >> 20)); in lround() 68 i = 1 << (0x432 - (hx >> 20)); in lround()
|
H A D | nearbyint.c | 50 unsigned hx, sx, i, frac; in __nearbyint() local 55 hx = xx.i[HIWORD] & ~0x80000000; in __nearbyint() 58 if (hx >= 0x43300000) { /* x is nan, inf, or already integral */ in __nearbyint() 59 if (hx >= 0x7ff00000) /* x is inf or nan */ in __nearbyint() 61 return (hx >= 0x7ff80000 ? x : x + x); in __nearbyint() 67 } else if ((hx | xx.i[LOWORD]) == 0) /* x is zero */ in __nearbyint() 78 if (hx < 0x3ff00000) { in __nearbyint() 80 (hx >= 0x3fe00000 && ((hx & 0xfffff) | xx.i[LOWORD])))) in __nearbyint() 89 j = 0x433 - (hx >> 20); in __nearbyint()
|
H A D | llround.c | 53 unsigned hx, sx, i; in llround() local 56 hx = xx.i[HIWORD] & ~0x80000000; in llround() 59 if (hx < 0x43300000) { /* |x| < 2^52 */ in llround() 61 if (hx < 0x3ff00000) { in llround() 62 if (hx >= 0x3fe00000) in llround() 68 if (hx < 0x41300000) { in llround() 69 i = 1 << (0x412 - (hx >> 20)); in llround() 73 i = 1 << (0x432 - (hx >> 20)); in llround()
|
H A D | frexp.c | 55 unsigned hx; in __frexp() local 59 hx = xx.i[HIWORD] & ~0x80000000; in __frexp() 61 if (hx >= 0x7ff00000) { /* x is infinite or NaN */ in __frexp() 67 if (hx < 0x00100000) { /* x is subnormal or zero */ in __frexp() 68 if ((hx | xx.i[LOWORD]) == 0) { in __frexp() 86 yy.i[HIWORD] = 0x43300000 | hx; in __frexp() 93 hx = xx.i[HIWORD] & ~0x80000000; in __frexp() 99 *exp = e + (hx >> 20) - 0x3fe; in __frexp()
|
H A D | truncf.c | 40 unsigned hx, sx, i; in truncf() local 43 hx = xx.i & ~0x80000000; in truncf() 45 if (hx < 0x4b000000) { /* |x| < 2^23 */ in truncf() 46 if (hx < 0x3f800000) /* |x| < 1 */ in truncf() 50 i = 1 << (0x95 - (hx >> 23)); in truncf() 53 } else if (hx < 0x7f800000) /* |x| is integral */ in truncf() 57 return (hx > 0x7f800000 ? x * x : x + x); in truncf()
|
H A D | nearbyintl.c | 49 unsigned hx, sx, i, frac; in __nearbyintl() local 56 hx = xx.i[0] & ~0x80000000; in __nearbyintl() 59 if (hx >= 0x406f0000) { /* x is nan, inf, or already integral */ in __nearbyintl() 61 if ((hx > 0x7fff0000 || (hx == 0x7fff0000 && in __nearbyintl() 62 (xx.i[1] | xx.i[2] | xx.i[3]))) && !(hx & 0x8000)) { in __nearbyintl() 65 xx.i[0] = sx | hx | 0x8000; in __nearbyintl() 68 } else if ((hx | xx.i[1] | xx.i[2] | xx.i[3]) == 0) /* x is zero */ in __nearbyintl() 80 if (hx < 0x3fff0000) { in __nearbyintl() 81 if (rm == FSR_RP || (rm == FSR_RN && (hx >= 0x3ffe0000 && in __nearbyintl() 82 ((hx & 0xffff) | xx.i[1] | xx.i[2] | xx.i[3])))) in __nearbyintl() [all …]
|
H A D | lroundf.c | 42 unsigned hx, sx, i; in lroundf() local 45 hx = xx.i & ~0x80000000; in lroundf() 47 if (hx < 0x4b000000) { /* |x| < 2^23 */ in lroundf() 48 if (hx < 0x3f800000) { /* |x| < 1 */ in lroundf() 49 if (hx >= 0x3f000000) in lroundf() 55 i = 1 << (0x95 - (hx >> 23)); in lroundf()
|
H A D | llroundf.c | 44 unsigned hx, sx, i; in llroundf() local 47 hx = xx.i & ~0x80000000; in llroundf() 50 if (hx < 0x4b000000) { /* |x| < 2^23 */ in llroundf() 52 if (hx < 0x3f800000) { in llroundf() 53 if (hx >= 0x3f000000) in llroundf() 59 i = 1 << (0x95 - (hx >> 23)); in llroundf()
|
H A D | truncl.c | 41 unsigned hx, sx; in truncl() local 46 hx = xx.i[0] & ~0x80000000; in truncl() 49 if (hx >= 0x406f0000) /* |x| >= 2^112 + ... or x is nan */ in truncl() 50 return (hx >= 0x7fff0000 ? x + x : x); in truncl() 53 if (hx < 0x3fff0000) in truncl() 56 j = 0x406f - (hx >> 16); /* 1 <= j <= 112 */ in truncl() 57 xx.i[0] = hx; in truncl()
|
H A D | modff.c | 41 unsigned hx, s; in __modff() local 44 hx = xx.i & ~0x80000000; in __modff() 46 if (hx >= 0x4b000000) { /* x is NaN, infinite, or integral */ in __modff() 48 if (hx <= 0x7f800000) in __modff() 53 if (hx < 0x3f800000) { /* |x| < 1 */ in __modff() 61 yy.i = xx.i & ~((1 << (0x96 - (hx >> 23))) - 1); in __modff()
|
H A D | lrintl.c | 51 unsigned int hx, sx, frac, l, fsr; in lrintl() local 57 hx = xx.i[0] & ~0x80000000; in lrintl() 60 if (hx > 0x401e0000) { /* |x| > 2^31 + ... or x is nan */ in lrintl() 64 } else if ((hx | xx.i[1] | xx.i[2] | xx.i[3]) == 0) /* x is zero */ in lrintl() 76 if (hx < 0x3fff0000) { in lrintl() 79 if (rm == FSR_RP || (rm == FSR_RN && (hx >= 0x3ffe0000 && in lrintl() 80 ((hx & 0xffff) | xx.i[1] | xx.i[2] | xx.i[3])))) in lrintl() 86 j = 0x406f - (hx >> 16); /* 91 <= j <= 112 */ in lrintl()
|
/illumos-gate/usr/src/lib/libm/common/C/ |
H A D | expm1.c | 165 unsigned hx; in expm1() local 167 hx = ((unsigned *) &x)[HIWORD]; /* high word of x */ in expm1() 168 xsb = hx & 0x80000000; /* sign bit of x */ in expm1() 173 hx &= 0x7fffffff; /* high word of |x| */ in expm1() 177 if (hx >= 0x4043687A) { in expm1() 179 if (hx >= 0x40862E42) { /* if |x|>=709.78... -> inf */ in expm1() 180 if (hx >= 0x7ff00000) { in expm1() 181 if (((hx & 0xfffff) | ((int *) &x)[LOWORD]) in expm1() 198 if (hx > 0x3fd62e42) { /* if |x| > 0.5 ln2 */ in expm1() 199 if (hx < 0x3FF0A2B2) { /* and |x| < 1.5 ln2 */ in expm1() [all …]
|
H A D | exp.c | 288 int hx, ix, k, j, m; in exp() local 291 hx = ix & ~0x80000000; in exp() 293 if (hx < 0x3ff0a2b2) { /* |x| < 3/2 ln 2 */ in exp() 294 if (hx < 0x3f862e42) { /* |x| < 1/64 ln 2 */ in exp() 295 if (hx < 0x3ed00000) { /* |x| < 2^-18 */ in exp() 302 if (hx < 0x3e300000) in exp() 313 k = hx >> 20; in exp() 314 j = (0x00100000 | (hx & 0x000fffff)) >> (0x40c - k); in exp() 325 if (hx >= 0x40862e42) { /* x is large, infinite, or nan */ in exp() 326 if (hx >= 0x7ff00000) { in exp()
|
H A D | erf.c | 283 int hx, ix, i; in erf() local 286 hx = ((int *) &x)[HIWORD]; in erf() 287 ix = hx & 0x7fffffff; in erf() 316 if (hx >= 0) in erf() 322 if (hx >= 0) in erf() 343 if (hx >= 0) in erf() 351 int hx, ix; in erfc() local 355 ix = hx & 0x7fffffff; in erfc() 387 if (hx >= 0) { in erfc() 416 if (hx > 0) in erfc() [all …]
|
H A D | exp2.c | 62 int ix, hx, k; in exp2() local 66 hx = ix & ~0x80000000; in exp2() 68 if (hx >= 0x4090e000) { /* |x| >= 1080 or x is nan */ in exp2() 69 if (hx >= 0x7ff00000) { /* x is inf or nan */ in exp2() 78 if (hx < 0x3fe00000) { /* |x| < 0.5 */ in exp2() 79 if (hx < 0x3c000000) in exp2()
|
H A D | log1p.c | 127 int k, hx, hu, ax; in log1p() local 129 hx = ((int *)&x)[HIWORD]; /* high word of x */ in log1p() 130 ax = hx & 0x7fffffff; in log1p() 133 if (((hx - 0xfff00000) | ((int *)&x)[LOWORD]) == 0) /* -inf */ in log1p() 139 if (hx < 0x3FDA827A) { /* x < 0.41422 */ in log1p() 149 if (hx > 0 || hx <= (int)0xbfd2bec3) { /* -0.2929<x<0.41422 */ in log1p() 157 if (hx < 0x43400000) { in log1p()
|