[llvm] [APFloat] Add `APFloat::getConstant` for C++20 <numbers> constants (PR #227916)

Eric Ross via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 18:28:29 PDT 2026


ZERICO2005 wrote:

@majnemer I'd appreciate your opinion on how `PPCDoubleDouble` should be handled here:
- Keep `PPCDoubleDouble` as is (which currently runs through `PPCDoubleDoubleLegacy` for 106 bits of precision). This is what I am leaning towards since the precision of `PPCDoubleDouble` constants will automatically improve with `convertFromString`.
- Have `PPCDoubleDouble` run through `IEEEQuad` for 113 bits of precision.
- Hard code `PPCDoubleDouble` math constants.
- Skip `PPCDoubleDouble` support for now.

Additionally, the decimal literal we currently have for each constant is precise enough for `PPCDoubleDouble`.


https://github.com/llvm/llvm-project/pull/227916


More information about the llvm-commits mailing list