]> granicus.if.org Git - php/commitdiff
Rename finite/isinf/isnan to more standard is_*() names.
authorjim winstead <jimw@php.net>
Wed, 9 Jan 2002 23:59:05 +0000 (23:59 +0000)
committerjim winstead <jimw@php.net>
Wed, 9 Jan 2002 23:59:05 +0000 (23:59 +0000)
NEWS
ext/standard/basic_functions.c
ext/standard/math.c
ext/standard/php_math.h
ext/standard/tests/math/pow.phpt

diff --git a/NEWS b/NEWS
index 73428e7b59bef253e3f2d268488e491f2c0a4d8c..674ee0b0db90be682b93608a60e019da572f461c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,7 @@ PHP 4                                                                      NEWS
   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 1012068e74126ccb095d78064f4d6c36f6c65f45..21bbeb52277716941df9613a048d205632bb6a85 100644 (file)
@@ -456,9 +456,9 @@ function_entry basic_functions[] = {
 #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 e7d6308056d653d182070cb012df2a345f49a03f..80653a1a55d6cef79a1b09e633bb9cbaf6ccb4cb 100644 (file)
@@ -383,9 +383,9 @@ PHP_FUNCTION(pi)
 /* }}} */
 
 
-/* {{{ 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 @@ PHP_FUNCTION(finite)
 }
 /* }}} */
 
-/* {{{ 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 @@ PHP_FUNCTION(isinf)
 }
 /* }}} */
 
-/* {{{ 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 71d9b6d88ee94ef26ad222a74c6e9c9d2e0a28c6..496ccf1b808143eb5bd39fa9b2a51834c21fc52d 100644 (file)
@@ -35,9 +35,9 @@ PHP_FUNCTION(pi);
 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 3480e076cd43d71c94f1c5abb815a3f0d0dc8df3..eb752e3220dbe43eb2de98f442f75317400c4cce 100644 (file)
@@ -21,8 +21,8 @@ $tests = <<<TESTS
  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 @@ $tests = <<<TESTS
  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 @@ sqrt(2) ~== pow(2,1/2)
  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 @@ sqrt(2) ~== pow(2,1/2)
  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)