Repository navigation
Conversation
|
If at all, shouldn't we use |
|
@cmb69 thanks for the feedback. That makes it better indeed. |
There was a problem hiding this comment.
A more correct approach of this check would look in pseudo code similar to abs(a - b) < threshold.
Thanks.
There was a problem hiding this comment.
@weltling, thanks for the feedback.
I've moved the constant to the LHS as it makes it more readable. Let me know if you prefer it differently.
|
@pmmaga thanks for checking. Nope, i literally meant to use abs() and the threshold is meant to be I've just tested more, your patch indeed improves the situation with cases as in the tests pushed, but perhaps you could also check cases like Thanks. |
|
Given that the change would not provide a consistent fix for all cases, it's better to leave the choice to users instead of trying (and sometimes failing) to help. |
Link for bugsnet: https://bugs.php.net/bug.php?id=75310
In #1695, this constant was removed. However, in cases like the one described in the bug report, this hack still makes a difference.