Closed vital0872 closed 4 years ago
this is, probably, by design, decimal representation cannot store 1/9 exactly, use rounding or use rational type like provided by big-rational on npm
I agree that it is an unpleasant case, but 0.99999999999999999999 is very close to one, and can easily become one with a little rounding as suggested above. See toSignificantDigits
or toDecimalPlaces
.
I have identified, in my opinion, an unpleasant case. A very simple expression is miscalced.
The expression "1 / 3 * 3" is also miscalced.
Config: defaults Environment: Google Chrome
Even the native type "Number" doesn’t allow this.