aboutsummaryrefslogtreecommitdiff
path: root/math/bits
diff options
context:
space:
mode:
authorRajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>2016-06-16 21:21:26 +0530
committerRajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>2016-06-16 21:37:45 +0530
commit41a359e22f3a85a570bd5fd94496d02959fe8394 (patch)
treeb07e8945a063a025f34f92e910bf8fb1e2e220d5 /math/bits
parentf45eb078922a5c64343a8da2d17fec54c27f8704 (diff)
downloadglibc-41a359e22f3a85a570bd5fd94496d02959fe8394.zip
glibc-41a359e22f3a85a570bd5fd94496d02959fe8394.tar.gz
glibc-41a359e22f3a85a570bd5fd94496d02959fe8394.tar.bz2
Add nextup and nextdown math functions
TS 18661 adds nextup and nextdown functions alongside nextafter to provide support for float128 equivalent to it. This patch adds nextupl, nextup, nextupf, nextdownl, nextdown and nextdownf to libm before float128 support. The nextup functions return the next representable value in the direction of positive infinity and the nextdown functions return the next representable value in the direction of negative infinity. These are currently enabled as GNU extensions.
Diffstat (limited to 'math/bits')
-rw-r--r--math/bits/mathcalls.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index 9a7b3f0..e2cf49f 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -294,6 +294,13 @@ __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
__MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__));
# endif
+#ifdef __USE_GNU
+/* Return X - epsilon. */
+__MATHCALL (nextdown,, (_Mdouble_ __x));
+/* Return X + epsilon. */
+__MATHCALL (nextup,, (_Mdouble_ __x));
+# endif
+
/* Return the remainder of integer divison X / Y with infinite precision. */
__MATHCALL (remainder,, (_Mdouble_ __x, _Mdouble_ __y));