From: Andrea Faulds Date: Sun, 20 Mar 2016 00:15:39 +0000 (+0000) Subject: Replace php_math_is_finite with zend_finite X-Git-Tag: php-7.1.0alpha1~449 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba4b2a60f932b05c929b843aaf010ac740579e2d;p=php Replace php_math_is_finite with zend_finite --- 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; }