From: Szabolcs Nagy Date: Sun, 2 Dec 2018 18:53:37 +0000 (+0000) Subject: math: add configuration macros X-Git-Tag: v1.1.23~57 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=169fc008d8daf5265847c593b1c78f3513d9172b;p=oweals%2Fmusl.git 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). --- 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)