summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Faulds <ajf@ajf.me>2016-03-20 00:15:39 +0000
committerAndrea Faulds <ajf@ajf.me>2016-03-20 00:15:39 +0000
commitba4b2a60f932b05c929b843aaf010ac740579e2d (patch)
tree5e7ec167ddb3d51216d3f9936ef70513abac5b3c
parente8f056e535813bf864743626c3a208ceafee70b9 (diff)
downloadphp-git-ba4b2a60f932b05c929b843aaf010ac740579e2d.tar.gz
Replace php_math_is_finite with zend_finite
-rw-r--r--ext/standard/math.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c
index ebfee8ead8..688ae9f6d1 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -93,18 +93,6 @@ static inline double php_intpow10(int power) {
}
/* }}} */
-/* {{{ php_math_is_finite */
-static inline int php_math_is_finite(double value) {
-#if defined(PHP_WIN32)
- return _finite(value);
-#elif defined(isfinite)
- return isfinite(value);
-#else
- return value == value && (value == 0. || value * 2. != value);
-#endif
-}
-/* }}} */
-
/* {{{ php_round_helper
Actually performs the rounding of a value to integer in a certain mode */
static inline double php_round_helper(double value, int mode) {
@@ -142,7 +130,7 @@ PHPAPI double _php_math_round(double value, int places, int mode) {
double tmp_value;
int precision_places;
- if (!php_math_is_finite(value)) {
+ if (!zend_finite(value)) {
return value;
}