diff --git a/include/cxx/cmath b/include/cxx/cmath index d921ca693dc..9ef49cfcab3 100644 --- a/include/cxx/cmath +++ b/include/cxx/cmath @@ -99,6 +99,9 @@ namespace std isnan(float __x) { return __builtin_isnan(__x); } + constexpr float + nextafter(float from, float to) + { return ::nextafterf(from, to); } #endif @@ -152,6 +155,10 @@ namespace std isnan(double __x) { return __builtin_isnan(__x); } + constexpr double + nextafter(double from, double to) + { return ::nextafter(from, to); } + #endif #ifdef CONFIG_HAVE_LONG_DOUBLE @@ -202,6 +209,10 @@ namespace std isnan(long double __x) { return __builtin_isnan(__x); } + constexpr long double + nextafter(long double from, long double to) + { return ::nextafterl(from, to); } + #endif }