diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2023-12-15 13:57:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-15 13:57:35 +0100 |
| commit | 3546f4da1975ec65c1ccc5a2372f050c2a9b92aa (patch) | |
| tree | 082931360d1fe1b3f5a2c56f2786bf799e983287 /libc/fuzzing/stdlib/strtofloat_fuzz.cpp | |
| parent | 3a31cf88538ed5282fce5408a48e48265e019ca6 (diff) | |
[libc][NFC] Rename `MANTISSA_WIDTH` in `FRACTION_LEN` (#75489)
This one might be a bit controversial since the terminology has been
introduced from the start but I think `FRACTION_LEN` is a better name
here. AFAICT it really is "the number of bits after the decimal dot when
the number is in normal form."
`MANTISSA_WIDTH` is less precise as it's unclear whether we take the
leading bit into account.
This patch also renames most of the properties to use the `_LEN` suffix
and fixes useless casts or variables.
Diffstat (limited to 'libc/fuzzing/stdlib/strtofloat_fuzz.cpp')
| -rw-r--r-- | libc/fuzzing/stdlib/strtofloat_fuzz.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/fuzzing/stdlib/strtofloat_fuzz.cpp b/libc/fuzzing/stdlib/strtofloat_fuzz.cpp index f6cc8abedf46..ea2f492f57ae 100644 --- a/libc/fuzzing/stdlib/strtofloat_fuzz.cpp +++ b/libc/fuzzing/stdlib/strtofloat_fuzz.cpp @@ -33,7 +33,7 @@ template <typename F> inline constexpr int effective_precision(int exponent) { // 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>::EXPONENT_BIAS - 1); + (-exponent) - (FloatProperties<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. |
