aboutsummaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2018-12-02 18:53:37 +0000
committerRich Felker <dalias@aerifal.cx>2019-04-17 13:12:21 -0400
commit169fc008d8daf5265847c593b1c78f3513d9172b (patch)
tree6c9f0951c6ed4382dc48c625c24218cd5fe01cc1 /src/internal
parent3c3763fc529114e209aea08336a420c5d5be4dc2 (diff)
downloadmusl-169fc008d8daf5265847c593b1c78f3513d9172b.zip
musl-169fc008d8daf5265847c593b1c78f3513d9172b.tar.gz
musl-169fc008d8daf5265847c593b1c78f3513d9172b.tar.bz2
math: add configuration macros
Musl currently aims to support non-nearest rounding mode and does not support SNaNs. These macros allow marking relevant code paths in case these decisions are changed later (they also help documenting the corner cases involved).
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/libm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/internal/libm.h b/src/internal/libm.h
index 2853760..5212bab 100644
--- a/src/internal/libm.h
+++ b/src/internal/libm.h
@@ -59,6 +59,11 @@ union ldshape {
#error Unsupported long double representation
#endif
+/* Support non-nearest rounding mode. */
+#define WANT_ROUNDING 1
+/* Support signaling NaNs. */
+#define WANT_SNAN 0
+
/* Helps static branch prediction so hot path can be better optimized. */
#ifdef __GNUC__
#define predict_true(x) __builtin_expect(!!(x), 1)