summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorjim winstead <jimw@php.net>2002-01-09 23:59:05 +0000
committerjim winstead <jimw@php.net>2002-01-09 23:59:05 +0000
commit831473d76ef3f052701f96d5c5739c97d0f2462d (patch)
treeb3e1d3f0d7545abd83aec4f9ed318d982150ca5e /ext
parente68095972ea476731a485410b72d39088b69f643 (diff)
downloadphp-git-831473d76ef3f052701f96d5c5739c97d0f2462d.tar.gz
Rename finite/isinf/isnan to more standard is_*() names.
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/basic_functions.c6
-rw-r--r--ext/standard/math.c12
-rw-r--r--ext/standard/php_math.h6
-rw-r--r--ext/standard/tests/math/pow.phpt16
4 files changed, 20 insertions, 20 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 1012068e74..21bbeb5227 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -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)
diff --git a/ext/standard/math.c b/ext/standard/math.c
index e7d6308056..80653a1a55 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -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;
diff --git a/ext/standard/php_math.h b/ext/standard/php_math.h
index 71d9b6d88e..496ccf1b80 100644
--- a/ext/standard/php_math.h
+++ b/ext/standard/php_math.h
@@ -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);
diff --git a/ext/standard/tests/math/pow.phpt b/ext/standard/tests/math/pow.phpt
index 3480e076cd..eb752e3220 100644
--- a/ext/standard/tests/math/pow.phpt
+++ b/ext/standard/tests/math/pow.phpt
@@ -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)