Skip to content

Commit ba4b2a6

Browse files
Replace php_math_is_finite with zend_finite
1 parent e8f056e commit ba4b2a6

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

ext/standard/math.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,6 @@ static inline double php_intpow10(int power) {
9393
}
9494
/* }}} */
9595

96-
/* {{{ php_math_is_finite */
97-
static inline int php_math_is_finite(double value) {
98-
#if defined(PHP_WIN32)
99-
return _finite(value);
100-
#elif defined(isfinite)
101-
return isfinite(value);
102-
#else
103-
return value == value && (value == 0. || value * 2. != value);
104-
#endif
105-
}
106-
/* }}} */
107-
10896
/* {{{ php_round_helper
10997
Actually performs the rounding of a value to integer in a certain mode */
11098
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) {
142130
double tmp_value;
143131
int precision_places;
144132

145-
if (!php_math_is_finite(value)) {
133+
if (!zend_finite(value)) {
146134
return value;
147135
}
148136

0 commit comments

Comments
 (0)