>From 32e1cd071774472e454f334aee333188e4f8f9b9 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 2 Dec 2018 18:53:37 +0000 Subject: [PATCH 10/18] 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(+) 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) -- 2.19.1