diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2024-03-28 14:33:47 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-03-28 16:29:16 +0100 |
commit | 4ce2bd0e5788e53f0377da857b72b08c4222aaef (patch) | |
tree | 2719eccc634f4bc82115e9610056868723d57fef /libm | |
parent | 1640c262dc63e2f8f43c0728dbe867c8fffe3e9d (diff) |
libm: fix nexttoward failures, fixed by sorear
Diffstat (limited to 'libm')
-rw-r--r-- | libm/s_nextafter.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libm/s_nextafter.c b/libm/s_nextafter.c index 73a8ab2be..7eb4ec46e 100644 --- a/libm/s_nextafter.c +++ b/libm/s_nextafter.c @@ -18,6 +18,7 @@ #include "math.h" #include "math_private.h" +#include <float.h> double nextafter(double x, double y) { @@ -68,5 +69,13 @@ double nextafter(double x, double y) return x; } libm_hidden_def(nextafter) +#if LDBL_MANT_DIG == DBL_MANT_DIG strong_alias_untyped(nextafter, nexttoward) libm_hidden_def(nexttoward) +#else +double nexttoward(double x, long double y) +{ + return nextafter(x, y); +} +libm_hidden_def(nexttoward) +#endif |