cxx/cmath: expose 'nextafter'

expose 'nextafter'

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko
2025-12-09 18:03:10 +08:00
committed by Xiang Xiao
parent 8c3106e2a4
commit 9c38276249
+11
View File
@@ -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
}