[libc-commits] [PATCH] D105153: [libc] Add on float properties for precision floating point numbers in FloatProperties.h
Arthur Eubanks via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Jun 30 09:44:18 PDT 2021
aeubanks added inline comments.
================
Comment at: libc/utils/FPUtil/FloatProperties.h:111
+ static constexpr BitsType mantissaMask =
+ (BitsType(0x0000ffffffffffffULL) << 64) | BitsType(0xffffffffffffffffULL);
+ static constexpr BitsType signMask = BitsType(0x8000000000000000U) << 64;
----------------
`(BitsType(1) << mantissaWidth) - 1` is cleaner (and same for the other ones above)
================
Comment at: libc/utils/FPUtil/FloatProperties.h:112
+ (BitsType(0x0000ffffffffffffULL) << 64) | BitsType(0xffffffffffffffffULL);
+ static constexpr BitsType signMask = BitsType(0x8000000000000000U) << 64;
+ static constexpr BitsType exponentMask = ~(signMask | mantissaMask);
----------------
`BitsType(1) << 79`? (or whatever the proper number is)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105153/new/
https://reviews.llvm.org/D105153
More information about the libc-commits
mailing list