Print this page
11175 libm should use signbit() correctly
11188 c99 math macros should return strictly backward compatible values

@@ -25,11 +25,12 @@
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-/* __rem_pio2l(x,y)
+/*
+ * __rem_pio2l(x,y)
  *
  * return the remainder of x rem pi/2 in y[0]+y[1]
  * by calling __rem_pio2m
  */
 

@@ -68,11 +69,11 @@
         n = __rem_pio2m(t, v, e0, nx, 2, _TBL_ipio2l_inf);
         z = (long double)v[1];
         w = (long double)v[0];
         y[0] = z + w;
         y[1] = z - (y[0] - w);
-        if (sign == 1) {
+        if (sign != 0) {
                 y[0] = -y[0];
                 y[1] = -y[1];
                 return (-n);
         }
         return (n);