|| (defined(__powerpc__) && defined(_ARCH_PWR8) \
&& defined(__LITTLE_ENDIAN__) && (_CALL_ELF == 2) \
&& defined(__FLOAT128__)))
-//# define _GLIBCXX_HAVE_FLOAT128_MATH 1
+# define _GLIBCXX_HAVE_FLOAT128_MATH 1
#endif
#if __GLIBC_PREREQ(2, 27)
nearbyint(_Float16 __x)
{ return _Float16(__builtin_nearbyintf(__x)); }
- inline _Float16
+ constexpr _Float16
nextafter(_Float16 __x, _Float16 __y)
{
+ if (std::__is_constant_evaluated())
+ return __builtin_nextafterf16(__x, __y);
#ifdef __INT16_TYPE__
using __float16_int_type = __INT16_TYPE__;
#else
nearbyint(__gnu_cxx::__bfloat16_t __x)
{ return __gnu_cxx::__bfloat16_t(__builtin_nearbyintf(__x)); }
- inline __gnu_cxx::__bfloat16_t
+ constexpr __gnu_cxx::__bfloat16_t
nextafter(__gnu_cxx::__bfloat16_t __x, __gnu_cxx::__bfloat16_t __y)
{
+ if (std::__is_constant_evaluated())
+ return __builtin_nextafterf16b(__x, __y);
#ifdef __INT16_TYPE__
using __bfloat16_int_type = __INT16_TYPE__;
#else
VERIFY(std::fpclassify(t36) == FP_NAN);
T t37 = std::nextafter(T(-0.0), T());
VERIFY(t37 == T() && !std::signbit(t37));
+ static_assert(std::nextafter(T(1.0), T(2.0)) > T(1.0));
+ static_assert(std::nextafter(std::nextafter(T(1.0), T(5.0)), T(0.0)) == T(1.0));
}
int