Kaynağa Gözat

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).
Szabolcs Nagy 6 yıl önce
ebeveyn
işleme
169fc008d8
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      src/internal/libm.h

+ 5 - 0
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)