minor fix in __tanl (get sign properly)

This commit is contained in:
nsz 2012-03-19 19:14:32 +01:00
parent eca1c35e5b
commit c3587effe2
1 changed files with 1 additions and 2 deletions

View File

@ -51,8 +51,7 @@ long double __tanl(long double x, long double y, int iy) {
int i;
iy = iy == 1 ? -1 : 1; /* XXX recover original interface */
// FIXME: this is wrong, use copysign, signbit or union bithack
osign = x >= 0 ? 1.0 : -1.0; /* XXX slow, probably wrong for -0 */
osign = copysignl(1.0, x);
if (fabsl(x) >= 0.67434) {
if (x < 0) {
x = -x;