Home
last modified time | relevance | path

Searched refs:exponent (Results 1 – 25 of 129) sorted by relevance

123456

/freebsd/contrib/llvm-project/libc/src/__support/FPUtil/
H A DNormalFloat.h40 int32_t exponent; member
51 : exponent(e), mantissa(m), sign(s) { in NormalFloat()
57 exponent -= normalization_shift; in NormalFloat()
72 if (exponent > other.exponent) { in cmp()
74 } else if (exponent == other.exponent) { in cmp()
91 result.exponent += e; in mul2()
96 int biased_exponent = exponent + FPBits<T>::EXP_BIAS; in T()
107 if (exponent < SUBNORMAL_EXPONENT) { in T()
108 unsigned shift = static_cast<unsigned>(SUBNORMAL_EXPONENT - exponent); in T()
142 static_cast<StorageType>(exponent + FPBits<T>::EXP_BIAS)); in T()
[all …]
H A Ddyadic_float.h92 int exponent = 0; member
102 exponent = x_bits.get_explicit_exponent() - FPBits<T>::FRACTION_LEN; in DyadicFloat()
108 : sign(s), exponent(e), mantissa(m) { in DyadicFloat()
117 exponent -= shift_length; in normalize()
126 exponent -= static_cast<int>(shift_length); in shift_left()
129 exponent = 0; in shift_left()
138 exponent += static_cast<int>(shift_length); in shift_right()
141 exponent = 0; in shift_right()
149 return exponent + (Bits - 1); in get_unbiased_exponent()
294 int exp_hi = exponent + static_cast<int>((Bits - 1) + FPBits<T>::EXP_BIAS); in fast_as()
[all …]
H A DNearestIntegerOperations.h36 int exponent = bits.get_exponent(); in trunc() local
40 if (exponent >= static_cast<int>(FPBits<T>::FRACTION_LEN)) in trunc()
44 if (exponent <= -1) in trunc()
47 int trim_size = FPBits<T>::FRACTION_LEN - exponent; in trunc()
64 int exponent = bits.get_exponent(); in ceil() local
68 if (exponent >= static_cast<int>(FPBits<T>::FRACTION_LEN)) in ceil()
71 if (exponent <= -1) { in ceil()
78 uint32_t trim_size = FPBits<T>::FRACTION_LEN - exponent; in ceil()
116 int exponent = bits.get_exponent(); in round() local
120 if (exponent >= static_cast<int>(FPBits<T>::FRACTION_LEN)) in round()
[all …]
H A DManipulationFunctions.h50 exp = normal.exponent + 1; in frexp()
51 normal.exponent = -1; in frexp()
116 int exponent = normal.get_unbiased_exponent();
123 if (LIBC_UNLIKELY(exponent > IntLogbConstants<T>::T_MAX ||
124 exponent < IntLogbConstants<T>::T_MIN)) {
127 return exponent > 0 ? IntLogbConstants<T>::T_MAX
131 return static_cast<T>(exponent);
203 normal.exponent += static_cast<int>(exp);
H A DDivisionAndRemainderOperations.h57 int exp = normalx.exponent - normaly.exponent; in remquo()
82 NormalFloat<T> remainder(Sign::POS, exp + normaly.exponent, mx); in remquo()
/freebsd/contrib/llvm-project/libc/src/__support/
H A Dfloat_to_string.h184 LIBC_INLINE constexpr UInt<MID_INT_SIZE> get_table_positive(int exponent, in get_table_positive() argument
192 static_cast<int>(exponent + CALC_SHIFT_CONST - (BLOCK_SIZE * i)); in get_table_positive()
222 LIBC_INLINE UInt<MID_INT_SIZE> get_table_positive_df(int exponent, size_t i) { in get_table_positive_df() argument
232 static_cast<int>(exponent + CALC_SHIFT_CONST - (9 * i)); in get_table_positive_df()
280 LIBC_INLINE UInt<MID_INT_SIZE> get_table_negative(int exponent, size_t i) { in get_table_negative() argument
281 int shift_amount = CALC_SHIFT_CONST - exponent; in get_table_negative()
332 LIBC_INLINE UInt<MID_INT_SIZE> get_table_negative_df(int exponent, size_t i) { in get_table_negative_df() argument
342 int shift_amount = CALC_SHIFT_CONST - exponent; in get_table_negative_df()
408 int exponent; variable
416 exponent = float_bits.get_explicit_exponent(); in FloatToString()
[all …]
H A Dstr_to_float.h48 int32_t exponent; member
97 int32_t exp10 = init_num.exponent;
194 output.exponent = exp2;
210 int32_t exp10 = init_num.exponent;
319 output.exponent = exp2;
553 int32_t exp10 = init_num.exponent;
629 output.exponent = result.get_biased_exponent();
691 int32_t exp10 = init_num.exponent;
740 opt_output->exponent == second_output->exponent) {
773 int32_t exp2 = init_num.exponent; in binary_exp_to_float()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/
H A Dfp_fixint_impl.inc19 // 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 (fixint_t)(sign * (significand >> (significandBits - exponent)));
39 return (fixint_t)(sign * ((fixuint_t)significand << (exponent - significandBits)));
H A Dfp_fixuint_impl.inc17 // 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 Dfloatunsisf.c29 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 Dfloatunsitf.c28 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 Dfloatunditf.c28 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 Dfloatunsidf.c29 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()
H A Dfloatditf.c36 const int exponent = (aWidth - 1) - __builtin_clzll(aAbs); in __floatditf() local
40 const int shift = significandBits - exponent; in __floatditf()
44 result += (rep_t)(exponent + exponentBias) << significandBits; in __floatditf()
H A Dfp_add_impl.inc67 // Extract the exponent and significand from the (possibly swapped) a and b.
73 // Normalize any denormals, and adjust the exponent accordingly.
110 // and adjust the exponent.
120 // adjust the exponent.
133 // The result is denormal before rounding. The exponent is zero and we
147 // Insert the exponent and sign.
/freebsd/contrib/arm-optimized-routines/math/
H A Dtgamma128.c189 int exponent; in tgamma128() local
202 exponent = -16384; in tgamma128()
205 frexpl(x, &exponent); in tgamma128()
206 exponent--; in tgamma128()
274 if (exponent >= 11) { in tgamma128()
286 } else if (exponent >= 3) { in tgamma128()
289 } else if (exponent < -113) { in tgamma128()
292 } else if (exponent < -5) { in tgamma128()
295 } else if (exponent == 0) { in tgamma128()
297 } else if (exponent < 0) { in tgamma128()
/freebsd/contrib/arm-optimized-routines/math/test/rtest/
H A Dsemi.c618 int exponent = x[0] & 0x7f800000; in test_isnanf() local
620 if ((exponent == 0x7f800000) && (fraction != 0)) out[0] = 1; in test_isnanf()
628 int exponent = x[0] & 0x7ff00000; in test_isnan() local
630 if ((exponent == 0x7ff00000) && ((fractionhigh != 0) || x[1] != 0)) in test_isnan()
639 int exponent = x[0] & 0x7f800000; in test_isnormalf() local
640 if (exponent == 0x7f800000) out[0] = 0; in test_isnormalf()
641 else if (exponent == 0) out[0] = 0; in test_isnormalf()
649 int exponent = x[0] & 0x7ff00000; in test_isnormal() local
650 if (exponent == 0x7ff00000) out[0] = 0; in test_isnormal()
651 else if (exponent == 0) out[0] = 0; in test_isnormal()
[all …]
/freebsd/contrib/arm-optimized-routines/math/tools/
H A Dtgamma128_gen.jl30 exponent = BigInt(floor(log2(x)))
31 exponent = max(exponent, -16382)
32 @assert(exponent <= 16383) # else overflow
34 x /= BigFloat(2)^exponent
41 exponent)
53 exponent = BigInt(floor(log2(x)))
54 exponent = max(exponent, -16382)
55 @assert(exponent <= 16383) # else overflow
57 x /= BigFloat(2)^exponent
68 return sign * mantissa * BigFloat(2)^(exponent - 112)
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DAPFloat.cpp486 int exponent = 0; in totalExponent() local
518 exponent = unsignedExponent; in totalExponent()
520 exponent = -exponent; in totalExponent()
521 exponent += exponentAdjustment; in totalExponent()
522 if (exponent > 32767 || exponent < -32768) in totalExponent()
527 exponent = negative ? -32768: 32767; in totalExponent()
529 return exponent; in totalExponent()
569 int exponent; member
583 D->exponent = 0; in interpretDecimal()
610 D->exponent = *ExpOrErr; in interpretDecimal()
[all …]
/freebsd/contrib/llvm-project/libc/src/__support/FPUtil/generic/
H A Dsqrt.h41 LIBC_INLINE void normalize(int &exponent,
46 exponent -= shift;
52 LIBC_INLINE void normalize<long double>(int &exponent, uint64_t &mantissa) {
53 normalize<double>(exponent, mantissa);
57 LIBC_INLINE void normalize<long double>(int &exponent, UInt128 &mantissa) {
62 exponent -= shift;
/freebsd/contrib/ntp/libparse/
H A Dieee754io.c175 long exponent; in fetch_ieee754()
311 exponent = characteristic - bias; in fetch_ieee754()
313 if (exponent > 31) /* sorry - hardcoded */ in fetch_ieee754()
324 frac_offset = mbits - exponent; in fetch_ieee754()
433 long exponent; in put_ieee754()
484 exponent = mantissa_high = mantissa_low = 0; /* true zero */ in put_ieee754()
543 exponent = msb - 32; in main()
544 characteristic = exponent + bias; in main()
177 long exponent; fetch_ieee754() local
420 long exponent; put_ieee754() local
/freebsd/contrib/ntp/libntp/
H A Dsnprintf.c90 * requires libm on most operating systems. Don't yet support the exponent
1106 int exponent = 0; in fmtflt() local
1158 * and on the exponent. However, the exponent can be in fmtflt()
1162 * (in order to get the exponent calculated). For in fmtflt()
1174 exponent = getexponent(fvalue); in fmtflt()
1201 ufvalue /= mypow10(exponent); in fmtflt()
1230 * part must be set to one and the exponent must be in fmtflt()
1234 exponent++; in fmtflt()
1239 * Now that we know the real exponent, w in fmtflt()
1417 int exponent = 0; getexponent() local
1482 mypow10(int exponent) mypow10() argument
[all...]
/freebsd/sys/contrib/device-tree/Bindings/power/supply/
H A Dltc2941.txt16 - lltc,prescaler-exponent: The prescaler exponent as explained in the datasheet.
27 lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */
/freebsd/contrib/wpa/wpa_supplicant/
H A Dtwt.c29 int wpas_twt_send_setup(struct wpa_supplicant *wpa_s, u8 dtok, int exponent, in wpas_twt_send_setup() argument
56 dtok, exponent, mantissa, min_twt); in wpas_twt_send_setup()
78 req_type |= (exponent & 0x1f) << 10; /* TWT Wake Interval Exponent */ in wpas_twt_send_setup()
/freebsd/lib/libc/resolv/
H A Dres_debug.c756 int mantissa, exponent; in precsize_ntoa() local
759 exponent = (int)((prec >> 0) & 0x0f) % 10; in precsize_ntoa()
761 val = mantissa * poweroften[exponent]; in precsize_ntoa()
773 int exponent; in precsize_aton() local
792 for (exponent = 0; exponent < 9; exponent++) in precsize_aton()
793 if (cmval < poweroften[exponent+1]) in precsize_aton()
796 mantissa = cmval / poweroften[exponent]; in precsize_aton()
800 retval = (mantissa << 4) | exponent; in precsize_aton()

123456