From 169fc008d8daf5265847c593b1c78f3513d9172b Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 2 Dec 2018 18:53:37 +0000 Subject: 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). --- src/internal/libm.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) -- cgit v1.2.1