You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the current version V12.3.0, config.epsilon doesn't seem to be working.
The expected behavior is:
epsilon. The minimum relative difference used to test equality between two compared values. This value is used by all relational functions. Default value is 1e-12.
equal(0, 1e-13) # false but should be trueequal(0, 1e-14) # false but should be trueequal(0, 1e-15) # false but should be trueequal(0, 1e-16) # trueconfig({epsilon:1e-3}) # {"epsilon": 0.001, "matrix": "Matrix", ...equal(0, 1e-4) # false but should be trueequal(0, 1e-6) # false but should be trueequal(0, 1e-7) # false but should be trueequal(0, 1e-15) # false but should be trueequal(0, 1e-16) # true
Regardless of config.epsilon, it's as if the value of epsilon was 2.220446049250313e-16
On the current version V12.3.0,
config.epsilon
doesn't seem to be working.The expected behavior is:
Regardless of
config.epsilon
, it's as if the value of epsilon was2.220446049250313e-16
And it seems to be coming from this line of code.
mathjs/src/utils/number.js
Line 596 in a131845
I have not tested all relational functions but is seems consistent on the few I have tested.
Maybe it's also related to #3100
(Also tested V9.5.2, V10.6.4 and V11.12.0 with the same results)
The text was updated successfully, but these errors were encountered: