cvs: php4 / NEWS /ext/standard basic_functions.c math.c php_math.h /ext/standard/tests/math pow.phpt

From: Date: Wed, 09 Jan 2002 23:59:05 +0000
Subject: cvs: php4 / NEWS /ext/standard basic_functions.c math.c php_math.h /ext/standard/tests/math pow.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9009@lists.php.net to get a copy of this message
jimw Wed Jan 9 18:59:05 2002 EDT Modified files: /php4 NEWS /php4/ext/standard basic_functions.c math.c php_math.h /php4/ext/standard/tests/math pow.phpt Log: Rename finite/isinf/isnan to more standard is_*() names. Index: php4/NEWS diff -u php4/NEWS:1.843 php4/NEWS:1.844 --- php4/NEWS:1.843 Mon Jan 7 20:14:22 2002 +++ php4/NEWS Wed Jan 9 18:59:04 2002 @@ -10,7 +10,7 @@ the differences are: it prints no HTTP headers, displays plain text error messages, etc. (Edin) - Made wordwrap() significantly faster. (Jim) -- Fixed pow(), and added finite(), isinf(), and isnan(). (Jim) +- Fixed pow(), and added is_finite(), is_infinite(), and is_nan(). (Jim) - Fixed segfault in wordwrap() when wrapping to zero width and using multi-character break or trying to force cut (bug #12768). (Jim) - Fixed several bugs in dbase extension (dbase_pack() truncate file to right Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.437 php4/ext/standard/basic_functions.c:1.438 --- php4/ext/standard/basic_functions.c:1.437 Wed Jan 9 18:47:18 2002 +++ php4/ext/standard/basic_functions.c Wed Jan 9 18:59:04 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.437 2002/01/09 23:47:18 jimw Exp $ */ +/* $Id: basic_functions.c,v 1.438 2002/01/09 23:59:04 jimw Exp $ */ #include "php.h" #include "php_main.h" @@ -456,9 +456,9 @@ #endif PHP_FE(pi, NULL) - PHP_FE(finite, NULL) - PHP_FE(isnan, NULL) - PHP_FE(isinf, NULL) + PHP_FE(is_finite, NULL) + PHP_FE(is_nan, NULL) + PHP_FE(is_infinite, NULL) PHP_FE(pow, NULL) PHP_FE(exp, NULL) PHP_FE(log, NULL) Index: php4/ext/standard/math.c diff -u php4/ext/standard/math.c:1.73 php4/ext/standard/math.c:1.74 --- php4/ext/standard/math.c:1.73 Sat Jan 5 03:29:53 2002 +++ php4/ext/standard/math.c Wed Jan 9 18:59:04 2002 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c,v 1.73 2002/01/05 08:29:53 jimw Exp $ */ +/* $Id: math.c,v 1.74 2002/01/09 23:59:04 jimw Exp $ */ #include "php.h" #include "php_math.h" @@ -383,9 +383,9 @@ /* }}} */ -/* {{{ proto bool finite(double val) +/* {{{ proto bool is_finite(double val) Returns whether double is finite */ -PHP_FUNCTION(finite) +PHP_FUNCTION(is_finite) { double dval; @@ -397,9 +397,9 @@ } /* }}} */ -/* {{{ proto bool isinf(double val) +/* {{{ proto bool is_infinite(double val) Returns whether double is infinite */ -PHP_FUNCTION(isinf) +PHP_FUNCTION(is_infinite) { double dval; @@ -410,9 +410,9 @@ } /* }}} */ -/* {{{ proto bool isnan(double val) +/* {{{ proto bool is_nan(double val) Returns whether double is not a number */ -PHP_FUNCTION(isnan) +PHP_FUNCTION(is_nan) { double dval; Index: php4/ext/standard/php_math.h diff -u php4/ext/standard/php_math.h:1.13 php4/ext/standard/php_math.h:1.14 --- php4/ext/standard/php_math.h:1.13 Fri Jan 4 22:45:10 2002 +++ php4/ext/standard/php_math.h Wed Jan 9 18:59:04 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_math.h,v 1.13 2002/01/05 03:45:10 jimw Exp $ */ +/* $Id: php_math.h,v 1.14 2002/01/09 23:59:04 jimw Exp $ */ #ifndef PHP_MATH_H #define PHP_MATH_H @@ -35,9 +35,9 @@ PHP_FUNCTION(exp); PHP_FUNCTION(log); PHP_FUNCTION(log10); -PHP_FUNCTION(finite); -PHP_FUNCTION(isinf); -PHP_FUNCTION(isnan); +PHP_FUNCTION(is_finite); +PHP_FUNCTION(is_infinite); +PHP_FUNCTION(is_nan); PHP_FUNCTION(pow); PHP_FUNCTION(sqrt); PHP_FUNCTION(srand); Index: php4/ext/standard/tests/math/pow.phpt diff -u php4/ext/standard/tests/math/pow.phpt:1.9 php4/ext/standard/tests/math/pow.phpt:1.10 --- php4/ext/standard/tests/math/pow.phpt:1.9 Fri Jan 4 22:45:11 2002 +++ php4/ext/standard/tests/math/pow.phpt Wed Jan 9 18:59:05 2002 @@ -3,7 +3,7 @@ --POST-- --GET-- --FILE-- -<?php // $Id: pow.phpt,v 1.9 2002/01/05 03:45:11 jimw Exp $ +<?php // $Id: pow.phpt,v 1.10 2002/01/09 23:59:05 jimw Exp $ define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF); define('LONG_MIN', -LONG_MAX - 1); @@ -21,8 +21,8 @@ 1 === pow(-1, 0) -1 === pow(-1, 1) 1 === pow(-1, 2) - TRUE === isinf(pow(0,-2)) - TRUE === isinf(pow(0,-1)) + TRUE === is_infinite(pow(0,-2)) + TRUE === is_infinite(pow(0,-1)) 1 === pow( 0, 0) 0 === pow( 0, 1) 0 === pow( 0, 2) @@ -46,8 +46,8 @@ 1.0 === pow(-1, 0.0) -1.0 === pow(-1, 1.0) 1.0 === pow(-1, 2.0) - TRUE === isinf(pow(0,-2.0)) - TRUE === isinf(pow(0,-1.0)) + TRUE === is_infinite(pow(0,-2.0)) + TRUE === is_infinite(pow(0,-1.0)) 1.0 === pow( 0, 0.0) 0.0 === pow( 0, 1.0) 0.0 === pow( 0, 2.0) @@ -78,8 +78,8 @@ 1.0 === pow(-1.0, 0.0) -1.0 === pow(-1.0, 1.0) 1.0 === pow(-1.0, 2.0) - TRUE === isinf(pow(0.0,-2.0)) - TRUE === isinf(pow(0.0,-1.0)) + TRUE === is_infinite(pow(0.0,-2.0)) + TRUE === is_infinite(pow(0.0,-1.0)) 1.0 === pow( 0.0, 0.0) 0.0 === pow( 0.0, 1.0) 0.0 === pow( 0.0, 2.0) @@ -103,8 +103,8 @@ 1.0 === pow(-1.0, 0) -1.0 === pow(-1.0, 1) 1.0 === pow(-1.0, 2) - TRUE === isinf(pow( 0.0,-2)) - TRUE === isinf(pow( 0.0,-1)) + TRUE === is_infinite(pow( 0.0,-2)) + TRUE === is_infinite(pow( 0.0,-1)) 1.0 === pow( 0.0, 0) 0.0 === pow( 0.0, 1) 0.0 === pow( 0.0, 2)

« previous php.cvs (#9009) next »