File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1250,6 +1250,7 @@ PHP_FUNCTION(min)
1250
1250
min = & args [i ];
1251
1251
}
1252
1252
} else if (Z_TYPE (args [i ]) == IS_DOUBLE && (zend_dval_to_lval ((double ) min_lval ) == min_lval )) {
1253
+ /* if min_lval can be exactly represented as a float, go to float dedicated code */
1253
1254
min_dval = (double ) min_lval ;
1254
1255
goto double_compare ;
1255
1256
} else {
@@ -1269,6 +1270,7 @@ PHP_FUNCTION(min)
1269
1270
min = & args [i ];
1270
1271
}
1271
1272
} else if (Z_TYPE (args [i ]) == IS_LONG && (zend_dval_to_lval ((double ) Z_LVAL (args [i ])) == Z_LVAL (args [i ]))) {
1273
+ /* if the value can be exactly represented as a float, use float dedicated code otherwise generic */
1272
1274
if (min_dval > (double )Z_LVAL (args [i ])) {
1273
1275
min_dval = (double )Z_LVAL (args [i ]);
1274
1276
min = & args [i ];
@@ -1337,6 +1339,7 @@ PHP_FUNCTION(max)
1337
1339
max = & args [i ];
1338
1340
}
1339
1341
} else if (Z_TYPE (args [i ]) == IS_DOUBLE && (zend_dval_to_lval ((double ) max_lval ) == max_lval )) {
1342
+ /* if max_level can be exactly represented as a float, go to float dedicated code */
1340
1343
max_dval = (double ) max_lval ;
1341
1344
goto double_compare ;
1342
1345
} else {
@@ -1356,6 +1359,7 @@ PHP_FUNCTION(max)
1356
1359
max = & args [i ];
1357
1360
}
1358
1361
} else if (Z_TYPE (args [i ]) == IS_LONG && (zend_dval_to_lval ((double ) Z_LVAL (args [i ])) == Z_LVAL (args [i ]))) {
1362
+ /* if the value can be exactly represented as a float, use float dedicated code otherwise generic */
1359
1363
if (max_dval < (double )Z_LVAL (args [i ])) {
1360
1364
max_dval = (double )Z_LVAL (args [i ]);
1361
1365
max = & args [i ];
You can’t perform that action at this time.
0 commit comments