Lines Matching +full:non +full:- +full:sticky

4  * Copyright (c) 1999-2019, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
19 if ((ex > 0x3ff + 52 - 1) || /* things this big can't be fractional */ in test_rint()
47 roundword |= 2; /* preserve sticky bit */ in test_rint()
82 if ((ex > 0x7f + 23 - 1) || /* things this big can't be fractional */ in test_rintf()
107 roundword |= 2; /* preserve sticky bit */ in test_rintf()
182 am[1] -= bm[1]; in test_fmod()
183 am[0] = am[0] - bm[0] - (am[1] > ~bm[1]); in test_fmod()
188 aex--; in test_fmod()
251 am -= bm; in test_fmodf()
255 aex--; in test_fmodf()
297 * Underflow. 2^-1074 is 00000000.00000001; so if ex == -1074 in test_ldexp()
298 * then we have something [2^-1075,2^-1074). Under round-to- in test_ldexp()
299 * nearest-even, this whole interval rounds up to 2^-1074, in test_ldexp()
303 * So, ex < -1074 is definite underflow, and ex == -1074 is in test_ldexp()
306 if (ex < -1074 || (ex == -1074 && (y[0] & 0xFFFFF) == 0 && y[1] == 0)) { in test_ldexp()
316 if (ex < -1021) { /* denormalise and round */ in test_ldexp()
321 while (ex < -1021) { in test_ldexp()
323 roundword |= 2; /* preserve sticky bit */ in test_ldexp()
372 * Underflow. 2^-149 is 00000001; so if ex == -149 then we have in test_ldexpf()
373 * something [2^-150,2^-149). Under round-to- nearest-even, in test_ldexpf()
374 * this whole interval rounds up to 2^-149, except for the in test_ldexpf()
378 * So, ex < -149 is definite underflow, and ex == -149 is in test_ldexpf()
381 if (ex < -149 || (ex == -149 && (y & 0x7FFFFF) == 0)) { in test_ldexpf()
390 if (ex < -125) { /* denormalise and round */ in test_ldexpf()
395 while (ex < -125) { in test_ldexpf()
397 roundword |= 2; /* preserve sticky bit */ in test_ldexpf()
442 ex--; in test_frexp()
448 nout[0] = ex - 0x3FE; in test_frexp()
453 nout[0] = ex - 0x3FE; in test_frexp()
477 ex--; in test_frexpf()
481 nout[0] = ex - 0x7E; in test_frexpf()
485 nout[0] = ex - 0x7E; in test_frexpf()
504 fh = x[0] - iout[0]; in test_modf()
505 fl = x[1] - iout[1]; in test_modf()
517 ex--; in test_modf()
540 f = *x - *iout; in test_modff()
550 ex--; in test_modff()
617 /* Being NaN means that our exponent is 0xff and non-0 fraction */ in test_isnanf()
627 /* Being NaN means that our exponent is 0x7ff and non-0 fraction */ in test_isnan()
697 * Internal function that compares doubles in x & y and returns -3, -2, -1, 0,
707 * NaNs have exponent 0x7ff, and non-zero fraction. Signaling NaNs take in fpcmp4()
710 if ((x[0] & 0x7fffffff) >= 0x7ff80000) result = -2; in fpcmp4()
711 else if ((x[0] & 0x7fffffff) > 0x7ff00000) result = -3; in fpcmp4()
712 else if (((x[0] & 0x7fffffff) == 0x7ff00000) && (x[1] != 0)) result = -3; in fpcmp4()
713 if ((y[0] & 0x7fffffff) >= 0x7ff80000 && result != -3) result = -2; in fpcmp4()
714 else if ((y[0] & 0x7fffffff) > 0x7ff00000) result = -3; in fpcmp4()
715 else if (((y[0] & 0x7fffffff) == 0x7ff00000) && (y[1] != 0)) result = -3; in fpcmp4()
727 * If x is +ve we have x > y return 1 - otherwise y is +ve return -1 in fpcmp4()
730 return ((x[0] >> 31) == 0) - ((y[0] >> 31) == 0); in fpcmp4()
737 * earns my undying admiration. Once you remove the sign-bit, the in fpcmp4()
739 * operators will treating the fp-numbers as integers with that bit- in fpcmp4()
742 if ((x[0] & 0x7fffffff) < (y[0] & 0x7fffffff)) result = -1; in fpcmp4()
744 else if (x[1] < y[1]) result = -1; in fpcmp4()
749 * Now we return the result - is x is positive (and therefore so is y) we in fpcmp4()
750 * return the plain result - otherwise we negate it and return. in fpcmp4()
753 else return -result; in fpcmp4()
757 * Internal function that compares floats in x & y and returns -3, -2, -1, 0,
767 * NaNs have exponent 0xff, and non-zero fraction - we have to handle all in fpcmp4f()
770 if ((x[0] & 0x7fffffff) >= 0x7fc00000) result = -2; in fpcmp4f()
771 else if ((x[0] & 0x7fffffff) > 0x7f800000) result = -3; in fpcmp4f()
772 if ((y[0] & 0x7fffffff) >= 0x7fc00000 && result != -3) result = -2; in fpcmp4f()
773 else if ((y[0] & 0x7fffffff) > 0x7f800000) result = -3; in fpcmp4f()
784 * If x is +ve we have x > y return 1 - otherwise y is +ve return -1 in fpcmp4f()
787 return ((x[0] >> 31) == 0) - ((y[0] >> 31) == 0); in fpcmp4f()
794 * earns my undying admiration. Once you remove the sign-bit, the in fpcmp4f()
796 * operators will treating the fp-numbers as integers with that bit- in fpcmp4f()
799 if ((x[0] & 0x7fffffff) < (y[0] & 0x7fffffff)) result = -1; in fpcmp4f()
804 * Now we return the result - is x is positive (and therefore so is y) we in fpcmp4f()
805 * return the plain result - otherwise we negate it and return. in fpcmp4f()
808 else return -result; in fpcmp4f()
815 return result == -3 ? "i" : NULL; in test_isgreater()
822 return result == -3 ? "i" : NULL; in test_isgreaterequal()
828 *out = (result == -1); in test_isless()
829 return result == -3 ? "i" : NULL; in test_isless()
835 *out = (result == -1) || (result == 0); in test_islessequal()
836 return result == -3 ? "i" : NULL; in test_islessequal()
842 *out = (result == -1) || (result == 1); in test_islessgreater()
843 return result == -3 ? "i" : NULL; in test_islessgreater()
855 *out = (result == -2) || (result == -3); in test_isunordered()
856 return result == -3 ? "i" : NULL; in test_isunordered()
863 return result == -3 ? "i" : NULL; in test_isgreaterf()
870 return result == -3 ? "i" : NULL; in test_isgreaterequalf()
876 *out = (result == -1); in test_islessf()
877 return result == -3 ? "i" : NULL; in test_islessf()
883 *out = (result == -1) || (result == 0); in test_islessequalf()
884 return result == -3 ? "i" : NULL; in test_islessequalf()
890 *out = (result == -1) || (result == 1); in test_islessgreaterf()
891 return result == -3 ? "i" : NULL; in test_islessgreaterf()
903 *out = (result == -2) || (result == -3); in test_isunorderedf()
904 return result == -3 ? "i" : NULL; in test_isunorderedf()