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/src/math/generic/log1pf.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/src/math/generic/log1pf.cpp')
| -rw-r--r-- | libc/src/math/generic/log1pf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/src/math/generic/log1pf.cpp b/libc/src/math/generic/log1pf.cpp index fabd2bdc31bf..891700d5ed08 100644 --- a/libc/src/math/generic/log1pf.cpp +++ b/libc/src/math/generic/log1pf.cpp @@ -57,7 +57,7 @@ LIBC_INLINE float log(double x) { // Get the 8 highest bits, use 7 bits (excluding the implicit hidden bit) for // lookup tables. int f_index = static_cast<int>(xbits.get_mantissa() >> - (fputil::FPBits<double>::MANTISSA_WIDTH - 7)); + (fputil::FPBits<double>::FRACTION_LEN - 7)); // Set bits to 1.m xbits.set_biased_exponent(0x3FF); |
