[all-commits] [llvm/llvm-project] 7b387d: [libc][NFC] Fix mixed up biased/unbiased exponent ...
Guillaume Chatelet via All-commits
all-commits at lists.llvm.org
Mon Dec 11 08:07:03 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7b387d2758ed58b4a6c901dc3ea4ccf897c333a4
https://github.com/llvm/llvm-project/commit/7b387d2758ed58b4a6c901dc3ea4ccf897c333a4
Author: Guillaume Chatelet <gchatelet at google.com>
Date: 2023-12-11 (Mon, 11 Dec 2023)
Changed paths:
M libc/src/__support/FPUtil/FPBits.h
M libc/src/__support/FPUtil/Hypot.h
M libc/src/__support/FPUtil/NormalFloat.h
M libc/src/__support/FPUtil/fpbits_str.h
M libc/src/__support/FPUtil/generic/FMA.h
M libc/src/__support/FPUtil/generic/FMod.h
M libc/src/__support/FPUtil/generic/sqrt.h
M libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h
M libc/src/__support/FPUtil/x86_64/LongDoubleBits.h
M libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h
M libc/src/__support/str_to_float.h
M libc/src/math/generic/expf.cpp
M libc/src/math/generic/explogxf.h
M libc/src/math/generic/hypotf.cpp
M libc/src/math/generic/log10f.cpp
M libc/src/math/generic/log1p.cpp
M libc/src/math/generic/log1pf.cpp
M libc/src/math/generic/log2f.cpp
M libc/src/math/generic/logf.cpp
M libc/src/math/generic/powf.cpp
M libc/test/src/__support/FPUtil/fpbits_test.cpp
M libc/test/src/math/LdExpTest.h
M libc/test/src/math/NextAfterTest.h
M libc/test/src/math/RoundToIntegerTest.h
M libc/test/src/math/smoke/LdExpTest.h
M libc/test/src/math/smoke/NextAfterTest.h
M libc/test/src/math/smoke/NextTowardTest.h
M libc/test/utils/FPUtil/x86_long_double_test.cpp
M libc/utils/MPFRWrapper/MPFRUtils.cpp
Log Message:
-----------
[libc][NFC] Fix mixed up biased/unbiased exponent (#75037)
According to [wikipedia](https://en.wikipedia.org/wiki/Exponent_bias)
the "biased exponent" is the encoded form that is always positive
whereas the unbiased form is the actual "real" exponent that can be
positive or negative.
`FPBits` seems to be using `unbiased_exponent` to describe the encoded
form (unsigned). This patch simply use `biased` instead of `unbiased`.
More information about the All-commits
mailing list