Skip to content

Commit c4a9e36

Browse files
committed
Remove useless check in epislon_equal func
1 parent 41bed79 commit c4a9e36

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

ext/standard/tests/math/pow.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ),
99
is_int(LONG_MIN-1),is_int(LONG_MAX+1));
1010

1111
function epsilon_equal($left, $right): bool {
12-
if (!is_float($left) && !is_int($left) || !is_float($right) && !is_int($right)) {
13-
return false;
14-
}
1512
return abs(($left-$right) / $left) < 1e-12;
1613
}
1714

ext/standard/tests/math/round.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ),
99
is_int(LONG_MIN-1),is_int(LONG_MAX+1));
1010

1111
function epsilon_equal($left, $right): bool {
12-
if (!is_float($left) && !is_int($left) || !is_float($right) && !is_int($right)) {
13-
return false;
14-
}
1512
return abs(($left-$right) / $left) < 1e-12;
1613
}
1714

0 commit comments

Comments
 (0)