use #if LDBL_MANT_DIG == ... instead of custom LD80 etc macros
[libm] / src / math / __rem_pio2l.h
index 3a747b1..37f3bd2 100644 (file)
  * Optimized by Bruce D. Evans.
  */
 #include "libm.h"
  * Optimized by Bruce D. Evans.
  */
 #include "libm.h"
-#if LD80
+#if LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
 /* ld80 version of __rem_pio2(x,y)
  *
  * return the remainder of x rem pi/2 in y[0]+y[1]
 /* ld80 version of __rem_pio2(x,y)
  *
  * return the remainder of x rem pi/2 in y[0]+y[1]
- * use __rem_pio2_slow()
+ * use __rem_pio2_large() for large x
  */
 
 #define BIAS    (LDBL_MAX_EXP - 1)
  */
 
 #define BIAS    (LDBL_MAX_EXP - 1)
@@ -135,7 +135,7 @@ static inline int __rem_pio2l(long double x, long double *y)
        nx = 3;
        while (tx[nx-1] == zero)
                nx--;     /* skip zero term */
        nx = 3;
        while (tx[nx-1] == zero)
                nx--;     /* skip zero term */
-       n = __rem_pio2_slow(tx,ty,e0,nx,2);
+       n = __rem_pio2_large(tx,ty,e0,nx,2);
        r = (long double)ty[0] + ty[1];
        w = ty[1] - (r - ty[0]);
        if (expsign < 0) {
        r = (long double)ty[0] + ty[1];
        w = ty[1] - (r - ty[0]);
        if (expsign < 0) {