From 9c38276249349234bc9dfd47425979cbe6024828 Mon Sep 17 00:00:00 2001 From: Petro Karashchenko Date: Sun, 7 Dec 2025 18:17:43 +0100 Subject: [PATCH] cxx/cmath: expose 'nextafter' expose 'nextafter' Signed-off-by: Petro Karashchenko --- include/cxx/cmath | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 }