From: Jeroen van Wolffelaar Date: Sat, 4 Aug 2001 18:03:29 +0000 (+0000) Subject: Fix bug in the tests :-( X-Git-Tag: PRE_ENGINE2_SPLIT~66 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58ee4e47a4e412855e9fab8d08717f09a6a143c9;p=php Fix bug in the tests :-( There seems to be one real bug in pow(), I'm trying to fix it... --- diff --git a/ext/standard/tests/math/pow.phpt b/ext/standard/tests/math/pow.phpt index bc6472b256..3ba2c6e420 100644 --- a/ext/standard/tests/math/pow.phpt +++ b/ext/standard/tests/math/pow.phpt @@ -117,14 +117,22 @@ FALSE === pow( 0.0,-1) 1.0 === pow( 2.0, 0) 2.0 === pow( 2.0, 1) 4.0 === pow( 2.0, 2) -LONG_MAX === pow(LONG_MAX,1); -LONG_MIN === pow(LONG_MIN,1); -LONG_MAX*LONG_MAX === pow(LONG_MAX,2); -LONG_MIN*LONG_MIN === pow(LONG_MIN,2); -(float)LONG_MAX === pow(LONG_MAX,1.0); -FALSE === pow(LONG_MIN,1.0); -LONG_MAX*LONG_MAX === pow(LONG_MAX,2.0); -FALSE === pow(LONG_MIN,2.0); +LONG_MAX-1 === pow(LONG_MAX-1,1) +LONG_MIN+1 === pow(LONG_MIN+1,1) +(LONG_MAX-1)*(LONG_MAX-1) === pow(LONG_MAX-1,2) +(LONG_MIN+1)*(LONG_MIN+1) === pow(LONG_MIN+1,2) +(float)(LONG_MAX-1) === pow(LONG_MAX-1,1.0) +FALSE === pow(LONG_MIN+1,1.0) +(LONG_MAX-1)*(LONG_MAX-1) === pow(LONG_MAX-1,2.0) +FALSE === pow(LONG_MIN+1,2.0) +LONG_MAX === pow(LONG_MAX,1) +LONG_MIN === pow(LONG_MIN,1) +LONG_MAX*LONG_MAX === pow(LONG_MAX,2) +LONG_MIN*LONG_MIN === pow(LONG_MIN,2) +(float)LONG_MAX === pow(LONG_MAX,1.0) +FALSE === pow(LONG_MIN,1.0) +LONG_MAX*LONG_MAX === pow(LONG_MAX,2.0) +FALSE === pow(LONG_MIN,2.0) TESTS; echo "On failure, please mail result to jeroen@php.net\n"; @@ -132,5 +140,5 @@ TESTS; --EXPECT-- 1,1,0,0 -On failure, please contact jeroen@php.net +On failure, please mail result to jeroen@php.net OK