diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2024-01-03 09:51:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-03 09:51:58 +0100 |
| commit | c09e6905567a6b546bb2fd9e863511a8fb939b19 (patch) | |
| tree | d91aff016bdaf6f8d14d5a39ce5547eeb299c916 /libc/fuzzing/stdlib | |
| parent | b7d5b0d0eeda9bc0c7e8c4a6ee2d4ab6b48eb736 (diff) | |
[libc][NFC] Remove `FloatProperties` (#76508)
Access is now done through `FPBits` exclusively.
This patch also renames a few internal structs and uses `T` instead of
`FP` as a template parameter.
Diffstat (limited to 'libc/fuzzing/stdlib')
| -rw-r--r-- | libc/fuzzing/stdlib/strtofloat_fuzz.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libc/fuzzing/stdlib/strtofloat_fuzz.cpp b/libc/fuzzing/stdlib/strtofloat_fuzz.cpp index 0e0d82fd3e8a..affef6fcf549 100644 --- a/libc/fuzzing/stdlib/strtofloat_fuzz.cpp +++ b/libc/fuzzing/stdlib/strtofloat_fuzz.cpp @@ -22,18 +22,17 @@ #include "utils/MPFRWrapper/mpfr_inc.h" -using LIBC_NAMESPACE::fputil::FloatProperties; +using LIBC_NAMESPACE::fputil::FPBits; // This function calculates the effective precision for a given float type and // exponent. Subnormals have a lower effective precision since they don't // necessarily use all of the bits of the mantissa. template <typename F> inline constexpr int effective_precision(int exponent) { - const int full_precision = FloatProperties<F>::MANTISSA_PRECISION; + const int full_precision = FPBits<F>::MANTISSA_PRECISION; // This is intended to be 0 when the exponent is the lowest normal and // increase as the exponent's magnitude increases. - const int bits_below_normal = - (-exponent) - (FloatProperties<F>::EXP_BIAS - 1); + const int bits_below_normal = (-exponent) - (FPBits<F>::EXP_BIAS - 1); // The precision should be the normal, full precision, minus the bits lost // by this being a subnormal, minus one for the implicit leading one. |
