| /llvm-project-15.0.7/libc/test/src/math/ |
| H A D | FrexpTest.h | 29 int exponent; in testSpecialNumbers() local 35 ASSERT_EQ(exponent, 0); in testSpecialNumbers() 38 ASSERT_EQ(exponent, 0); in testSpecialNumbers() 42 int exponent; in testPowersOfTwo() local 45 EXPECT_EQ(exponent, 1); in testPowersOfTwo() 47 EXPECT_EQ(exponent, 1); in testPowersOfTwo() 50 EXPECT_EQ(exponent, 2); in testPowersOfTwo() 52 EXPECT_EQ(exponent, 2); in testPowersOfTwo() 55 EXPECT_EQ(exponent, 3); in testPowersOfTwo() 57 EXPECT_EQ(exponent, 3); in testPowersOfTwo() [all …]
|
| H A D | ILogbTest.h | 87 int exponent; in test_subnormal_range() local 88 __llvm_libc::fputil::frexp(x, exponent); in test_subnormal_range() 89 ASSERT_EQ(exponent, func(x) + 1); in test_subnormal_range() 104 int exponent; in test_normal_range() local 105 __llvm_libc::fputil::frexp(x, exponent); in test_normal_range() 106 ASSERT_EQ(exponent, func(x) + 1); in test_normal_range()
|
| /llvm-project-15.0.7/libc/src/__support/FPUtil/ |
| H A D | NormalFloat.h | 37 int32_t exponent; member 54 exponent -= normalization_shift; in NormalFloat() 68 if (exponent > other.exponent) { in cmp() 70 } else if (exponent == other.exponent) { in cmp() 87 result.exponent += e; in mul2() 103 if (exponent < SUBNORMAL_EXPONENT) { in T() 147 exponent = 0; in init_from_bits() 180 exponent = 0; in init_from_bits() 193 exponent = -16382; in init_from_bits() 199 exponent = 0; in init_from_bits() [all …]
|
| H A D | NearestIntegerOperations.h | 35 int exponent = bits.get_exponent(); in trunc() local 43 if (exponent <= -1) { in trunc() 65 int exponent = bits.get_exponent(); in ceil() local 72 if (exponent <= -1) { in ceil() 116 int exponent = bits.get_exponent(); in round() local 123 if (exponent == -1) { in round() 131 if (exponent <= -2) { in round() 168 int exponent = bits.get_exponent(); in round_using_current_rounding_mode() local 176 if (exponent <= -1) { in round_using_current_rounding_mode() 221 if (exponent == 0) in round_using_current_rounding_mode() [all …]
|
| H A D | ManipulationFunctions.h | 38 exp = normal.exponent + 1; in frexp() 39 normal.exponent = -1; in frexp() 94 if (normal.exponent > INT_MAX) in ilogb() 96 else if (normal.exponent < INT_MIN) in ilogb() 99 return normal.exponent; in ilogb() 118 return normal.exponent; in logb() 144 normal.exponent += exp; in ldexp()
|
| /llvm-project-15.0.7/libclc/generic/lib/math/ |
| H A D | clc_fma.cl | 31 int exponent; 74 st_mul.exponent = st_mul.mantissa ? st_a.exponent + st_b.exponent : 0; 77 if (st_mul.exponent == 0 && st_mul.mantissa == 0) 84 int exp_diff = st_mul.exponent - st_c.exponent; 99 st_fma.exponent = max(st_mul.exponent, st_c.exponent); 104 …ssa = st_mul.mantissa - st_c.mantissa - (cutoff_bits && (st_mul.exponent > st_c.exponent) ? 1 : 0); 116 // adjust exponent 117 st_fma.exponent += overflow_bits; 141 ++st_fma.exponent; 149 if (st_fma.exponent > 127) [all …]
|
| H A D | clc_ldexp.cl | 52 int exponent; 58 exponent = val_ui >> 23; /* get the exponent */ 59 int dexp = exponent; 77 exponent += n; 79 val = sign | (exponent << 23) | (val_ui & 0x007fffff); 80 ex1 = exponent + multiplier; 83 val_ui = exponent > 0 ? val :val_ui; 84 val_ui = exponent > 254 ? 0x7f800000 :val_ui; /*overflow*/ 85 val_ui = exponent < -multiplier ? 0 : val_ui; /*underflow*/
|
| /llvm-project-15.0.7/third-party/benchmark/src/ |
| H A D | string_util.cc | 35 int64_t* exponent) { in ToExponentAndMantissa() argument 59 *exponent = i + 1; in ToExponentAndMantissa() 65 *exponent = 0; in ToExponentAndMantissa() 74 *exponent = -static_cast<int64_t>(i + 1); in ToExponentAndMantissa() 81 *exponent = 0; in ToExponentAndMantissa() 84 *exponent = 0; in ToExponentAndMantissa() 90 if (exponent == 0) return ""; in ExponentToPrefix() 92 const int64_t index = (exponent > 0 ? exponent - 1 : -exponent - 1); in ExponentToPrefix() 106 int64_t exponent; in ToBinaryStringFullySpecified() local 108 &exponent); in ToBinaryStringFullySpecified() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/builtins/ |
| H A D | fp_fixuint_impl.inc | 17 // Break a into sign, exponent, significand parts. 21 const int exponent = (aAbs >> significandBits) - exponentBias; 24 // If either the value or the exponent is negative, the result is zero. 25 if (sign == -1 || exponent < 0) 29 if ((unsigned)exponent >= sizeof(fixuint_t) * CHAR_BIT) 32 // If 0 <= exponent < significandBits, right shift to get the result. 34 if (exponent < significandBits) 35 return significand >> (significandBits - exponent); 37 return (fixuint_t)significand << (exponent - significandBits);
|
| H A D | fp_fixint_impl.inc | 19 // Break a into sign, exponent, significand parts. 23 const int exponent = (aAbs >> significandBits) - exponentBias; 26 // If exponent is negative, the result is zero. 27 if (exponent < 0) 31 if ((unsigned)exponent >= sizeof(fixint_t) * CHAR_BIT) 34 // If 0 <= exponent < significandBits, right shift to get the result. 36 if (exponent < significandBits) 37 return sign * (significand >> (significandBits - exponent)); 39 return sign * ((fixint_t)significand << (exponent - significandBits));
|
| H A D | floatunsisf.c | 29 const int exponent = (aWidth - 1) - clzsi(a); in __floatunsisf() local 33 if (exponent <= significandBits) { in __floatunsisf() 34 const int shift = significandBits - exponent; in __floatunsisf() 37 const int shift = exponent - significandBits; in __floatunsisf() 47 result += (rep_t)(exponent + exponentBias) << significandBits; in __floatunsisf()
|
| H A D | floatsisf.c | 36 const int exponent = (aWidth - 1) - clzsi(a); in __floatsisf() local 40 if (exponent <= significandBits) { in __floatsisf() 41 const int shift = significandBits - exponent; in __floatsisf() 44 const int shift = exponent - significandBits; in __floatsisf() 54 result += (rep_t)(exponent + exponentBias) << significandBits; in __floatsisf()
|
| H A D | floatunsitf.c | 28 const int exponent = (aWidth - 1) - clzsi(a); in __floatunsitf() local 32 const int shift = significandBits - exponent; in __floatunsitf() 36 result += (rep_t)(exponent + exponentBias) << significandBits; in __floatunsitf()
|
| H A D | floatunditf.c | 28 const int exponent = (aWidth - 1) - __builtin_clzll(a); in __floatunditf() local 32 const int shift = significandBits - exponent; in __floatunditf() 36 result += (rep_t)(exponent + exponentBias) << significandBits; in __floatunditf()
|
| H A D | floatunsidf.c | 29 const int exponent = (aWidth - 1) - clzsi(a); in __floatunsidf() local 33 const int shift = significandBits - exponent; in __floatunsidf() 37 result += (rep_t)(exponent + exponentBias) << significandBits; in __floatunsidf()
|
| /llvm-project-15.0.7/libc/src/stdio/printf_core/ |
| H A D | float_hex_converter.h | 34 int exponent; in convert_float_hex_exp() local 45 exponent = float_bits.get_exponent(); in convert_float_hex_exp() 54 exponent = float_bits.get_exponent(); in convert_float_hex_exp() 73 if (exponent == -exponent_bias) { in convert_float_hex_exp() 75 ++exponent; in convert_float_hex_exp() 77 exponent = 0; in convert_float_hex_exp() 86 exponent -= mantissa_width % BITS_IN_HEX_DIGIT; in convert_float_hex_exp() 137 exponent += BITS_IN_HEX_DIGIT; in convert_float_hex_exp() 169 if (exponent < 0) { in convert_float_hex_exp() 171 exponent = -exponent; in convert_float_hex_exp() [all …]
|
| /llvm-project-15.0.7/flang/include/flang/Evaluate/ |
| H A D | real.h | 269 int exponent{intPart.value.Exponent()}; 314 if (exponent < 1) { 315 bitsLost += 1 - exponent; 316 exponent = 1; 346 int exponent{Exponent()}; in GetFraction() 347 if (exponent > 0 && exponent < maxExponent) { in GetFraction() 362 ++exponent; in UnbiasedExponent() 364 return exponent; in UnbiasedExponent() 386 exponent += !exponent; in CombineExponents() 389 exponent += exponentBias - yExponent; in CombineExponents() [all …]
|
| /llvm-project-15.0.7/flang/runtime/ |
| H A D | edit-input.cpp | 250 exponent = 0; in ScanRealInput() 303 exponent = 10 * exponent + *next - '0'; in ScanRealInput() 307 exponent = 10 * exponent; in ScanRealInput() 314 exponent = -exponent; in ScanRealInput() 328 exponent = 0; in ScanRealInput() 451 int exponent{0}; in EditCommonRealInput() local 462 if (exponent != 0) { in EditCommonRealInput() 464 if (exponent < 0) { in EditCommonRealInput() 466 exponent = -exponent; in EditCommonRealInput() 468 if (exponent > 9999) { in EditCommonRealInput() [all …]
|
| H A D | edit-output.cpp | 179 char *exponent{eEnd}; in FormatExponent() local 188 overflow = exponent + ed < eEnd; in FormatExponent() 189 while (exponent > exponent_ + 2 /*E+*/ && exponent + ed > eEnd) { in FormatExponent() 190 *--exponent = '0'; in FormatExponent() 192 } else if (exponent == eEnd) { in FormatExponent() 196 while (exponent + 2 > eEnd) { in FormatExponent() 197 *--exponent = '0'; in FormatExponent() 200 *--exponent = expo < 0 ? '-' : '+'; in FormatExponent() 204 length = eEnd - exponent; in FormatExponent() 205 return overflow ? nullptr : exponent; in FormatExponent() [all …]
|
| /llvm-project-15.0.7/flang/lib/Evaluate/ |
| H A D | real.cpp | 86 int exponent{Exponent()}; in Add() local 129 ++exponent; in Add() 157 if (exponent < 1) { in Multiply() 159 exponent = 1; in Multiply() 185 exponent -= lshift; in Multiply() 249 if (exponent < 1) { in Divide() 255 exponent = 1; in Divide() 500 exponent -= lshift; in Normalize() 503 exponent = 0; in Normalize() 505 exponent = 1; in Normalize() [all …]
|
| /llvm-project-15.0.7/libclc/clspv/lib/math/ |
| H A D | fma.cl | 33 int exponent; 91 ? st_a.exponent + st_b.exponent 98 int exp_diff = st_mul.exponent - st_c.exponent; 139 st_fma.exponent = max(st_mul.exponent, st_c.exponent); 148 (st_mul.exponent > st_c.exponent)) 181 // adjust exponent 182 st_fma.exponent += overflow_bits; 235 ++st_fma.exponent; 244 if (st_fma.exponent > 127) { 249 if (st_fma.exponent <= -127) { [all …]
|
| /llvm-project-15.0.7/libc/AOR_v20.02/math/test/rtest/ |
| H A D | semi.c | 619 int exponent = x[0] & 0x7f800000; in test_isnanf() local 629 int exponent = x[0] & 0x7ff00000; in test_isnan() local 640 int exponent = x[0] & 0x7f800000; in test_isnormalf() local 641 if (exponent == 0x7f800000) out[0] = 0; in test_isnormalf() 642 else if (exponent == 0) out[0] = 0; in test_isnormalf() 650 int exponent = x[0] & 0x7ff00000; in test_isnormal() local 651 if (exponent == 0x7ff00000) out[0] = 0; in test_isnormal() 652 else if (exponent == 0) out[0] = 0; in test_isnormal() 673 int exponent = (x[0] & 0x7ff00000) >> 20; in test_fpclassify() local 676 if ((exponent == 0x00) && (fraction == 0)) out[0] = 0; in test_fpclassify() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | APFloat.cpp | 338 exponent = -exponent; in totalExponent() 340 if (exponent > 32767 || exponent < -32768) in totalExponent() 746 exponent = rhs.exponent; in assign() 826 exponent = rhs.exponent; in operator =() 918 if (isFiniteNonZero() && exponent != rhs.exponent) in bitwiseIsEqual() 993 assert(exponent == rhs.exponent); in addSignificand() 1007 assert(exponent == rhs.exponent); in subtractSignificand() 1047 exponent += rhs.exponent; in multiplySignificand() 1180 exponent -= rhs.exponent; in divideSignificand() 1275 compare = exponent - rhs.exponent; in compareAbsoluteValue() [all …]
|
| /llvm-project-15.0.7/libc/test/utils/FPUtil/ |
| H A D | x86_long_double_test.cpp | 24 bits.exponent = FPBits::MAX_EXPONENT; in TEST() 45 bits.exponent = 1; in TEST() 56 bits.exponent = 1; in TEST() 67 bits.exponent = 0; in TEST() 77 bits.exponent = 0; in TEST()
|
| /llvm-project-15.0.7/libc/src/__support/FPUtil/generic/ |
| H A D | sqrt.h | 37 static inline void normalize(int &exponent, 41 exponent -= shift; 47 inline void normalize<long double>(int &exponent, uint64_t &mantissa) { 48 normalize<double>(exponent, mantissa); 52 inline void normalize<long double>(int &exponent, UInt128 &mantissa) { 57 exponent -= shift;
|