cvs: php4 /ext/standard math.c
| From: | Jeroen van Wolffelaar | Date: | Sat, 04 Aug 2001 20:58:47 +0000 |
| Subject: | cvs: php4 /ext/standard math.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6555@lists.php.net to get a copy of this message | ||
jeroen Sat Aug 4 16:58:47 2001 EDT
Modified files:
/php4/ext/standard math.c
Log:
Another bugfix in pow. Special cases, with 10 times the same thing are
_so_ error_prone... :(
Index: php4/ext/standard/math.c
diff -u php4/ext/standard/math.c:1.48 php4/ext/standard/math.c:1.49
--- php4/ext/standard/math.c:1.48 Sat Aug 4 16:52:35 2001
+++ php4/ext/standard/math.c Sat Aug 4 16:58:47 2001
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: math.c,v 1.48 2001/08/04 20:52:35 rasmus Exp $ */
+/* $Id: math.c,v 1.49 2001/08/04 20:58:47 jeroen Exp $ */
#include "php.h"
#include "php_math.h"
@@ -470,7 +470,8 @@
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 */