I have verified and I cannot find canonical information about the errors that occur when doing calculations with javascript.
such a simple example with addition:
>0.1 + 0.2
0.30000000000000004
or when doing this subtraction:
>1.7-1.6
0.10000000000000009
It seems wrong to me that in 2020 it is not known exactly why these errors occur; or in my case I can’t find a canonical answer.
I also don’t make sense to it, that there is no native solution and programmers find it necessary to use the .toFix () method to solve this precision problem.