[libc-commits] [libc] [libc][NFC] Rename `MANTISSA_WIDTH` in `FRACTION_BITS` (PR #75489)
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Fri Dec 15 02:13:26 PST 2023
================
@@ -92,10 +93,10 @@ template <typename T> class FrexpTest : public LIBC_NAMESPACE::testing::Test {
}
void testRange(FrexpFunc func) {
- using UIntType = typename FPBits::UIntType;
- constexpr UIntType COUNT = 100'000;
- constexpr UIntType STEP = UIntType(-1) / COUNT;
- for (UIntType i = 0, v = 0; i <= COUNT; ++i, v += STEP) {
+ using StorageType = typename FPBits::StorageType;
+ constexpr StorageType COUNT = 100'000;
+ constexpr StorageType STEP = StorageType(-1) / COUNT;
----------------
gchatelet wrote:
In a separate patch
@lntue we need to get rid of these because they don't work with `BigInt`.
The most general fix seems to be using `cpp::numeric_limts<StorageType>::max();`
https://github.com/llvm/llvm-project/pull/75489
More information about the libc-commits
mailing list