-
- Downloads
libstdc++: Small extended float support tweaks
The following patch 1) enables the std::float128_t overloads for x86 with glibc 2.26+ 2) makes std::nextafter(std::float16_t, std::float16_t) and std::nextafter(std::bfloat16_t, std::bfloat16_t) constexpr 3) adds (small) testsuite coverage for that 2022-10-21 Jakub Jelinek <jakub@redhat.com> * config/os/gnu-linux/os_defines.h (_GLIBCXX_HAVE_FLOAT128_MATH): Uncomment. * include/c_global/cmath (nextafter(_Float16, _Float16)): Make it constexpr. If std::__is_constant_evaluated() call __builtin_nextafterf16. (nextafter(__gnu_cxx::__bfloat16_t, __gnu_cxx::__bfloat16_t)): Similarly but call __builtin_nextafterf16b. * testsuite/26_numerics/headers/cmath/nextafter_c++23.cc (test): Add static assertions to test constexpr nextafter.
Showing
- libstdc++-v3/config/os/gnu-linux/os_defines.h 1 addition, 1 deletionlibstdc++-v3/config/os/gnu-linux/os_defines.h
- libstdc++-v3/include/c_global/cmath 6 additions, 2 deletionslibstdc++-v3/include/c_global/cmath
- libstdc++-v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc 2 additions, 0 deletions...v3/testsuite/26_numerics/headers/cmath/nextafter_c++23.cc
Loading
Please register or sign in to comment