Print this page
11175 libm should use signbit() correctly
11188 c99 math macros should return strictly backward compatible values
*** 65,75 ****
small = 1.0e-10,
big = 1.0e10;
/* INDENT ON */
double
! tanh(double x) {
double t, y, z;
int signx;
volatile double dummy __unused;
if (isnan(x))
--- 65,76 ----
small = 1.0e-10,
big = 1.0e10;
/* INDENT ON */
double
! tanh(double x)
! {
double t, y, z;
int signx;
volatile double dummy __unused;
if (isnan(x))
*** 92,100 ****
return (x);
}
} else if (!finite(t))
return (copysign(1.0, x));
else
! return (signx == 1 ? -z + small * small : z - small * small);
! return (signx == 1 ? -z : z);
}
--- 93,101 ----
return (x);
}
} else if (!finite(t))
return (copysign(1.0, x));
else
! return ((signx != 0) ? -z + small * small : z - small * small);
! return ((signx != 0) ? -z : z);
}