Issue 233494
Summary [libcxx] Support extended floating point types (like `__float128`) in `std::numbers`
Labels libc++, floating-point
Assignees
Reporter ZERICO2005
    Follow-up to https://github.com/llvm/llvm-project/issues/188079

Currently, extended floating point types such as `__float128` and `std::float128_t` are not supported by `libcxx` `<numbers>`.

See also https://github.com/llvm/llvm-project/issues/188079#issuecomment-4114842766
> libc++ hasn't implemented [P1467R9](https://wg21.link/p1467r9), so std::numbers::pi_v<__float128> or potential std::numbers::pi_v<std::float128_t> is ill-formed at this moment.

`__float128` does not satisfy the `floating_point` concept, so it is currently a compiler error to use `return std::numbers::pi_v<__float128>;`

Additionally, `libcxx` `<numbers>` uses `long double` literals, which may have lower precision than `__float128`.

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to