diff options
author | Szabolcs Nagy <nsz@port70.net> | 2018-12-02 18:53:37 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-04-17 13:12:21 -0400 |
commit | 169fc008d8daf5265847c593b1c78f3513d9172b (patch) | |
tree | 6c9f0951c6ed4382dc48c625c24218cd5fe01cc1 | |
parent | 3c3763fc529114e209aea08336a420c5d5be4dc2 (diff) | |
download | musl-169fc008d8daf5265847c593b1c78f3513d9172b.tar.gz |
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).
-rw-r--r-- | src/internal/libm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/internal/libm.h b/src/internal/libm.h index 28537603..5212bab1 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) |