Another bugfix in pow. Special cases, with 10 times the same thing are

_so_ error_prone... :(
This commit is contained in:
Jeroen van Wolffelaar 2001-08-04 20:58:47 +00:00
parent 7d5999fb4d
commit 68df8ea465

View File

@ -470,7 +470,8 @@ PHP_FUNCTION(pow)
if (lexp == 1) {
RETURN_LONG(LONG_MIN);
} else {
RETURN_DOUBLE(exp(log(-(double)LONG_MIN) * (double)lexp));
dval = exp(log(-(double)LONG_MIN) * (double)lexp);
RETURN_DOUBLE(lexp&1 ? -dval : dval);
}
default:
/* abs(lbase) > 1 */