some more fixes

This commit is contained in:
ceriel
1989-05-18 18:02:24 +00:00
parent e431cec90a
commit efe2c8d032
2 changed files with 15 additions and 8 deletions

View File

@@ -46,6 +46,7 @@ exp(x)
if (x > M_LN_MAX_D) errno = ERANGE;
return M_MAX_D;
}
if (negative) x = -x;
/* ??? avoid underflow ??? */
@@ -57,6 +58,10 @@ exp(x)
g = ((x1-xn*0.693359375)+x2) - xn*(-2.1219444005469058277e-4);
}
if (negative) {
g = -g;
n = -n;
}
xn = g * g;
x = g * POLYNOM2(xn, p);
n += 1;