cvs: php4 /ext/standard/tests/math pow.phpt

From: Date: Sat, 04 Aug 2001 18:03:29 +0000
Subject: cvs: php4 /ext/standard/tests/math pow.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6551@lists.php.net to get a copy of this message
jeroen Sat Aug 4 14:03:29 2001 EDT Modified files: /php4/ext/standard/tests/math pow.phpt Log: Fix bug in the tests :-( There seems to be one real bug in pow(), I'm trying to fix it... Index: php4/ext/standard/tests/math/pow.phpt diff -u php4/ext/standard/tests/math/pow.phpt:1.1 php4/ext/standard/tests/math/pow.phpt:1.2 --- php4/ext/standard/tests/math/pow.phpt:1.1 Sat Aug 4 09:20:31 2001 +++ php4/ext/standard/tests/math/pow.phpt Sat Aug 4 14:03:29 2001 @@ -117,14 +117,22 @@ 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 @@ --EXPECT-- 1,1,0,0 -On failure, please contact jeroen@php.net +On failure, please mail result to jeroen@php.net OK

« previous php.cvs (#6551) next »