]> granicus.if.org Git - php/commitdiff
Replace php_math_is_finite with zend_finite
authorAndrea Faulds <ajf@ajf.me>
Sun, 20 Mar 2016 00:15:39 +0000 (00:15 +0000)
committerAndrea Faulds <ajf@ajf.me>
Sun, 20 Mar 2016 00:15:39 +0000 (00:15 +0000)
ext/standard/math.c

index ebfee8ead8fe13dd970156ff4e0949b671c6b0a4..688ae9f6d1fe8945a2fe1fc9d41cf264dd0dac4d 100644 (file)
@@ -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;
        }