/aosp_15_r20/external/llvm-libc/test/src/math/smoke/ |
H A D | FrexpTest.h | 22 int exponent; in testSpecialNumbers() local 23 EXPECT_FP_EQ_ALL_ROUNDING(aNaN, func(aNaN, &exponent)); in testSpecialNumbers() 25 EXPECT_EQ(LIBC_FREXP_INF_NAN_EXPONENT, exponent); in testSpecialNumbers() 28 EXPECT_FP_EQ_ALL_ROUNDING(inf, func(inf, &exponent)); in testSpecialNumbers() 30 EXPECT_EQ(LIBC_FREXP_INF_NAN_EXPONENT, exponent); in testSpecialNumbers() 33 EXPECT_FP_EQ_ALL_ROUNDING(neg_inf, func(neg_inf, &exponent)); in testSpecialNumbers() 35 EXPECT_EQ(LIBC_FREXP_INF_NAN_EXPONENT, exponent); in testSpecialNumbers() 38 EXPECT_FP_EQ_ALL_ROUNDING(zero, func(zero, &exponent)); in testSpecialNumbers() 39 EXPECT_EQ(exponent, 0); in testSpecialNumbers() 41 EXPECT_FP_EQ_ALL_ROUNDING(-zero, func(-zero, &exponent)); in testSpecialNumbers() [all …]
|
/aosp_15_r20/external/llvm-libc/test/src/math/ |
H A D | FrexpTest.h | 31 int exponent; in testSpecialNumbers() local 32 ASSERT_FP_EQ(aNaN, func(aNaN, &exponent)); in testSpecialNumbers() 33 ASSERT_FP_EQ(inf, func(inf, &exponent)); in testSpecialNumbers() 34 ASSERT_FP_EQ(neg_inf, func(neg_inf, &exponent)); in testSpecialNumbers() 36 ASSERT_FP_EQ(0.0, func(0.0, &exponent)); in testSpecialNumbers() 37 ASSERT_EQ(exponent, 0); in testSpecialNumbers() 39 ASSERT_FP_EQ(-0.0, func(-0.0, &exponent)); in testSpecialNumbers() 40 ASSERT_EQ(exponent, 0); in testSpecialNumbers() 44 int exponent; in testPowersOfTwo() local 46 EXPECT_FP_EQ(T(0.5), func(T(1.0), &exponent)); in testPowersOfTwo() [all …]
|
/aosp_15_r20/external/icu/icu4c/source/i18n/ |
H A D | double-conversion-strtod.cpp | 119 int exponent, in CutToMaxSignificantDigits() argument 132 exponent + (buffer.length() - kMaxSignificantDecimalDigits); in CutToMaxSignificantDigits() 140 static void TrimAndCut(Vector<const char> buffer, int exponent, in TrimAndCut() argument 145 exponent += left_trimmed.length() - right_trimmed.length(); in TrimAndCut() 149 CutToMaxSignificantDigits(right_trimmed, exponent, in TrimAndCut() 155 *updated_exponent = exponent; in TrimAndCut() 196 // Compute the binary exponent. in ReadDiyFp() 197 int exponent = 0; in ReadDiyFp() local 198 *result = DiyFp(significand, exponent); in ReadDiyFp() 205 int exponent, in DoubleStrtod() argument [all …]
|
/aosp_15_r20/external/double-conversion/double-conversion/ |
H A D | strtod.cc | 105 int exponent, in CutToMaxSignificantDigits() argument 118 exponent + (buffer.length() - kMaxSignificantDecimalDigits); in CutToMaxSignificantDigits() 126 static void TrimAndCut(Vector<const char> buffer, int exponent, in TrimAndCut() argument 131 exponent += left_trimmed.length() - right_trimmed.length(); in TrimAndCut() 135 CutToMaxSignificantDigits(right_trimmed, exponent, in TrimAndCut() 141 *updated_exponent = exponent; in TrimAndCut() 182 // Compute the binary exponent. in ReadDiyFp() 183 int exponent = 0; in ReadDiyFp() local 184 *result = DiyFp(significand, exponent); in ReadDiyFp() 191 int exponent, in DoubleStrtod() argument [all …]
|
/aosp_15_r20/external/cronet/base/third_party/double_conversion/double-conversion/ |
H A D | strtod.cc | 105 int exponent, in CutToMaxSignificantDigits() argument 118 exponent + (buffer.length() - kMaxSignificantDecimalDigits); in CutToMaxSignificantDigits() 126 static void TrimAndCut(Vector<const char> buffer, int exponent, in TrimAndCut() argument 131 exponent += left_trimmed.length() - right_trimmed.length(); in TrimAndCut() 135 CutToMaxSignificantDigits(right_trimmed, exponent, in TrimAndCut() 141 *updated_exponent = exponent; in TrimAndCut() 182 // Compute the binary exponent. in ReadDiyFp() 183 int exponent = 0; in ReadDiyFp() local 184 *result = DiyFp(significand, exponent); in ReadDiyFp() 191 int exponent, in DoubleStrtod() argument [all …]
|
/aosp_15_r20/external/cronet/third_party/icu/source/i18n/ |
H A D | double-conversion-strtod.cpp | 119 int exponent, in CutToMaxSignificantDigits() argument 132 exponent + (buffer.length() - kMaxSignificantDecimalDigits); in CutToMaxSignificantDigits() 140 static void TrimAndCut(Vector<const char> buffer, int exponent, in TrimAndCut() argument 145 exponent += left_trimmed.length() - right_trimmed.length(); in TrimAndCut() 149 CutToMaxSignificantDigits(right_trimmed, exponent, in TrimAndCut() 155 *updated_exponent = exponent; in TrimAndCut() 196 // Compute the binary exponent. in ReadDiyFp() 197 int exponent = 0; in ReadDiyFp() local 198 *result = DiyFp(significand, exponent); in ReadDiyFp() 205 int exponent, in DoubleStrtod() argument [all …]
|
/aosp_15_r20/external/llvm/lib/Support/ |
H A D | APFloat.cpp | 114 /* Return the value of a decimal exponent of the form 117 If the exponent overflows, returns a large exponent with the 127 assert(p != end && "Exponent has no digits"); in readExponent() 132 assert(p != end && "Exponent has no digits"); in readExponent() 136 assert(absExponent < 10U && "Invalid character in exponent"); in readExponent() 142 assert(value < 10U && "Invalid character in exponent"); in readExponent() 153 assert(p == end && "Invalid exponent in exponent"); in readExponent() 169 int exponent = 0; in totalExponent() local 171 assert(p != end && "Exponent has no digits"); in totalExponent() 176 assert(p != end && "Exponent has no digits"); in totalExponent() [all …]
|
/aosp_15_r20/external/llvm-libc/src/__support/FPUtil/ |
H A D | FPBits.h | 71 // length of the sign, the exponent, fraction and significand parts. 73 // exponent bias and masks. It also holds the bit representation of the 90 // Defines the layout (sign, exponent, significand) of a floating point type in 145 using UP::EXP_LEN; // The number of bits for the *exponent* part 163 // The exponent bias. Always positive. 171 // The bit pattern that keeps only the *exponent* part. 177 // The bit pattern that keeps only the *exponent + significand* part. 180 // The bit pattern that keeps only the *sign + exponent + significand* part. 226 // An opaque type to store a floating point exponent. 229 struct Exponent : public TypedInt<int32_t> { [all …]
|
H A D | dyadic_float.h | 32 // exponent: the exponent value of the least significant bit of the mantissa. 35 // real value = (-1)^sign * 2^exponent * (mantissa as unsigned integer) 44 int exponent = 0; member 54 exponent = x_bits.get_explicit_exponent() - FPBits<T>::FRACTION_LEN; in DyadicFloat() 60 : sign(s), exponent(e), mantissa(m) { in DyadicFloat() 69 exponent -= shift_length; in normalize() 78 exponent -= static_cast<int>(shift_length); in shift_left() 81 exponent = 0; in shift_left() 90 exponent += static_cast<int>(shift_length); in shift_right() 93 exponent = 0; in shift_right() [all …]
|
/aosp_15_r20/external/apache-commons-math/src/main/java/org/apache/commons/math3/distribution/ |
H A D | ZipfDistribution.java | 43 * <li>{@code s} is the exponent 58 /** Exponent parameter of the distribution. */ 59 private final double exponent; field in ZipfDistribution 77 * Create a new Zipf distribution with the given number of elements and exponent. 86 * @param exponent Exponent. 87 * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} or {@code exponent 90 public ZipfDistribution(final int numberOfElements, final double exponent) { in ZipfDistribution() argument 91 this(new Well19937c(), numberOfElements, exponent); in ZipfDistribution() 99 * @param exponent Exponent. 100 * @exception NotStrictlyPositiveException if {@code numberOfElements <= 0} or {@code exponent [all …]
|
/aosp_15_r20/external/angle/third_party/spirv-tools/src/source/util/ |
H A D | hex_float.h | 225 // Number of bits that represent the exponent. 229 // The bias of the exponent. (How much we need to subtract from the stored 235 // 1 sign bit, 8 exponent bits, 23 fractional bits. 249 // 1 sign bit, 11 exponent bits, 52 fractional bits. 263 // 1 sign bit, 5 exponent bits, 10 fractional bits. 328 // The least significant bit in the exponent, which is also the bit 341 // The bits that represent the exponent. 345 // How far left the exponent is shifted. 352 // The maximum representable unbiased exponent. 355 // The minimum representable exponent for normalized numbers. [all …]
|
/aosp_15_r20/external/deqp-deps/SPIRV-Tools/source/util/ |
D | hex_float.h | 225 // Number of bits that represent the exponent. 229 // The bias of the exponent. (How much we need to subtract from the stored 235 // 1 sign bit, 8 exponent bits, 23 fractional bits. 249 // 1 sign bit, 11 exponent bits, 52 fractional bits. 263 // 1 sign bit, 5 exponent bits, 10 fractional bits. 328 // The least significant bit in the exponent, which is also the bit 341 // The bits that represent the exponent. 345 // How far left the exponent is shifted. 352 // The maximum representable unbiased exponent. 355 // The minimum representable exponent for normalized numbers. [all …]
|
/aosp_15_r20/external/swiftshader/third_party/SPIRV-Tools/source/util/ |
H A D | hex_float.h | 225 // Number of bits that represent the exponent. 229 // The bias of the exponent. (How much we need to subtract from the stored 235 // 1 sign bit, 8 exponent bits, 23 fractional bits. 249 // 1 sign bit, 11 exponent bits, 52 fractional bits. 263 // 1 sign bit, 5 exponent bits, 10 fractional bits. 328 // The least significant bit in the exponent, which is also the bit 341 // The bits that represent the exponent. 345 // How far left the exponent is shifted. 352 // The maximum representable unbiased exponent. 355 // The minimum representable exponent for normalized numbers. [all …]
|
/aosp_15_r20/external/FP16/include/fp16/ |
H A D | fp16.h | 34 * S - sign bit, E - bits of the biased exponent, M - bits of the mantissa, 0 - zero bits. in fp16_ieee_to_fp32_bits() 47 * Extract mantissa and biased exponent of the input number into the bits 0-30 of the 32-bit word: in fp16_ieee_to_fp32_bits() 57 …* If the initial number is normalized, some of its high 6 bits (sign == 0 and 5-bit exponent) equa… in fp16_ieee_to_fp32_bits() 59 …* denormalized nonsign by renorm_shift, the unit bit of mantissa will shift into exponent, turning… in fp16_ieee_to_fp32_bits() 60 * biased exponent into 1, and making mantissa normalized (i.e. without leading 1). in fp16_ieee_to_fp32_bits() 71 * Iff half-precision number has exponent of 15, the addition overflows it into bit 31, in fp16_ieee_to_fp32_bits() 74 …* 0x7F800000 if the half-precision number had exponent of 15 (i.e. was NaN or in… in fp16_ieee_to_fp32_bits() 88 …* 2. Shift nonsign right by 3 so the exponent (5 bits originally) becomes an 8-bit field and 10-bi… in fp16_ieee_to_fp32_bits() 90 * 3. Add 0x70 to the exponent (starting at bit 23) to compensate the different in exponent bias in fp16_ieee_to_fp32_bits() 92 …* 4. Subtract renorm_shift from the exponent (starting at bit 23) to account for renormalization. … in fp16_ieee_to_fp32_bits() [all …]
|
/aosp_15_r20/external/mesa3d/src/util/ |
H A D | format_r11g11b10f.h | 66 /* Map exponent to the range [-127,128] */ in f32_to_uf11() 67 int exponent = ((f32.ui >> 23) & 0xff) - 127; in f32_to_uf11() local 70 if (exponent == 128) { /* Infinity or NaN */ in f32_to_uf11() 94 } else if (exponent > -15) { /* Normal value */ in f32_to_uf11() 95 /* Dividing by 2^exponent gives us a number in the range [1, 2). in f32_to_uf11() 99 mantissa = _mesa_lroundevenf(ldexp(val, 6 - exponent)); in f32_to_uf11() 102 * exponent, so bump the exponent. in f32_to_uf11() 106 exponent++; in f32_to_uf11() 110 exponent += UF11_EXPONENT_BIAS; in f32_to_uf11() 111 uf11 = UF11(exponent, mantissa); in f32_to_uf11() [all …]
|
/aosp_15_r20/external/cldr/tools/cldr-code/src/main/java/com/ibm/icu/text/ |
H A D | FixedDecimal.java | 35 final int exponent; field in FixedDecimal 129 * @param e Suppressed exponent for scientific and compact notation 138 exponent = e; in FixedDecimal() 265 int exponent = Integer.parseInt(exponentStr); in decimals() local 266 int numFractionDigits = ePos - 2 - exponent; in decimals() 298 this.exponent = other.exponent; in FixedDecimal() 322 // int exponent = Integer.parseInt(exponentStr); 327 // exponent); 333 // The value of n needs to take the exponent into account 337 int exponent = 0; in parseDecimalSampleRangeNumString() local [all …]
|
/aosp_15_r20/external/icu/android_icu4j/src/main/java/android/icu/number/ |
H A D | ScientificNotation.java | 49 … * Sets the minimum number of digits to show in the exponent of scientific notation, padding with 57 * The minimum number of digits to show in the exponent. 83 * The strategy for displaying the sign in the exponent. 113 …// During formatting, we need to provide an object with state (the exponent) as the inner modifier. 122 … // the state (the exponent) into that ScientificModifier. There is no difference between safe and 131 /* unsafe */ int exponent; field in ScientificNotation.ScientificHandler 165 int exponent; in processQuantity() local 171 exponent = 0; in processQuantity() 174 exponent = 0; in processQuantity() 177 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, this); in processQuantity() [all …]
|
/aosp_15_r20/external/icu/icu4j/main/core/src/main/java/com/ibm/icu/number/ |
H A D | ScientificNotation.java | 49 … * Sets the minimum number of digits to show in the exponent of scientific notation, padding with 57 * The minimum number of digits to show in the exponent. 84 * The strategy for displaying the sign in the exponent. 115 …// During formatting, we need to provide an object with state (the exponent) as the inner modifier. 124 … // the state (the exponent) into that ScientificModifier. There is no difference between safe and 133 /* unsafe */ int exponent; field in ScientificNotation.ScientificHandler 167 int exponent; in processQuantity() local 173 exponent = 0; in processQuantity() 176 exponent = 0; in processQuantity() 179 exponent = -micros.rounder.chooseMultiplierAndApply(quantity, this); in processQuantity() [all …]
|
/aosp_15_r20/external/llvm-libc/src/__support/ |
H A D | float_to_string.h | 93 // formula: floor((mantissa * 2^exponent)/10^i) % 10^9. 95 // we use a shortcut. We can avoid calculating 2^exponent / 10^i by using a 99 // i > exponent since then 2^exponent / 10^i would be less than 1. To correct 100 // for this, the actual calculation done is 2^(exponent + c) / 10^i, and then 102 // floor((mantissa * table[exponent][i])/(2^c)) % 10^9. 128 "Incorrect exponent to perform log10_pow2 approximation."); in log10_pow2() 135 // conversion to get an explicit mantissa of 0x13441350fbd738 and an exponent in log10_pow2() 138 // the multiplication result, adding 12 to the exponent to compensate. To in log10_pow2() 169 // index (which is ceil(exponent/16)) and mantissa width could need. 184 LIBC_INLINE constexpr UInt<MID_INT_SIZE> get_table_positive(int exponent, in get_table_positive() argument [all …]
|
/aosp_15_r20/external/gemmlowp/fixedpoint/ |
H A D | fixedpoint_msa.h | 273 template <int Exponent> 274 struct ImplSaturatingRoundingMultiplyByPOT<Exponent, v4i32, 1> { 276 static_assert(Exponent >= 0 && Exponent < 32, ""); 277 if (Exponent < 5) { 278 for (int i = 0; i < Exponent; i++) { 283 // Saturate each signed 32-bit element to (32 - Exponent) 285 v4i32 res = __builtin_msa_sat_s_w(x, 31 - Exponent); 290 // will have Exponent trailing zero bits after the shift. Those 292 res = __builtin_msa_slli_w(res, Exponent); 301 template <int Exponent> [all …]
|
/aosp_15_r20/external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/ |
H A D | APFloat.cpp | 92 bits of mantissa and 11 bits of exponent. 228 /* Return the value of a decimal exponent of the form 231 If the exponent overflows, returns a large exponent with the 240 // Treat no exponent as 0 to match binutils in readExponent() 249 return createError("Exponent has no digits"); in readExponent() 254 return createError("Invalid character in exponent"); in readExponent() 261 return createError("Invalid character in exponent"); in readExponent() 283 int exponent = 0; in totalExponent() local 286 return createError("Exponent has no digits"); in totalExponent() 292 return createError("Exponent has no digits"); in totalExponent() [all …]
|
/aosp_15_r20/external/angle/third_party/glslang/src/SPIRV/ |
H A D | hex_float.h | 178 // Number of bits that represent the exponent. 182 // The bias of the exponent. (How much we need to subtract from the stored 188 // 1 sign bit, 8 exponent bits, 23 fractional bits. 202 // 1 sign bit, 11 exponent bits, 52 fractional bits. 216 // 1 sign bit, 5 exponent bits, 10 fractional bits. 281 // The least significant bit in the exponent, which is also the bit 294 // The bits that represent the exponent. 298 // How far left the exponent is shifted. 305 // The maximum representable unbiased exponent. 308 // The minimum representable exponent for normalized numbers. [all …]
|
/aosp_15_r20/external/deqp-deps/glslang/SPIRV/ |
D | hex_float.h | 178 // Number of bits that represent the exponent. 182 // The bias of the exponent. (How much we need to subtract from the stored 188 // 1 sign bit, 8 exponent bits, 23 fractional bits. 202 // 1 sign bit, 11 exponent bits, 52 fractional bits. 216 // 1 sign bit, 5 exponent bits, 10 fractional bits. 281 // The least significant bit in the exponent, which is also the bit 294 // The bits that represent the exponent. 298 // How far left the exponent is shifted. 305 // The maximum representable unbiased exponent. 308 // The minimum representable exponent for normalized numbers. [all …]
|
/aosp_15_r20/cts/tests/tests/renderscript/src/android/renderscript/cts/ |
H A D | Float16Utils.java | 28 // 16-bit masks for extracting sign, exponent and mantissa bits 41 // NaN has all exponent bits set to 1 and a non-zero mantissa 47 // Infinity has all exponent bits set to 1 and zeroes in mantissa 53 // Subnormal numbers have exponent bits set to 0 and a non-zero mantissa 74 // Extract sign, exponent and mantissa in convertFloat16ToFloat() 76 int exponent = (val & EXPONENT_MASK) >> 10; in convertFloat16ToFloat() local 94 // value is 2^(exponent - 15) * 1.<mantissa> in convertFloat16ToFloat() 95 result = Math.scalb(1, exponent - 15) * (1 + mantissaAsFloat); in convertFloat16ToFloat() 107 /* This utility function accepts the mantissa, exponent and an isNegative flag and constructs a 108 * double value. The exponent should be biased, but not shifted left by 52-bits. [all …]
|
/aosp_15_r20/external/aac/libFDK/include/ |
H A D | fixpoint_math.h | 168 * \param a_e exponent of the first input value. 170 * \param b_e exponent of the second input value. 288 /* Correct odd exponent. */ in sqrtFixp_lookup() 299 /* Write back exponent */ in sqrtFixp_lookup() 310 * \param result_e pointer to return the exponent of the result 337 *shift += 2; /* bias for exponent */ in invSqrtNorm2() 360 /* calculate the output exponent = input exp/2 */ in invSqrtNorm2() 390 * \return mantissa of the result with implicit exponent of 31 411 * \param op_e pointer into were the exponent of the input value is stored, and 452 * \param result_e pointer to an INT where the exponent of the result is stored [all …]
|