[Solved] Why the result of ‘0.3 * 3’ is 0.89999999999999 in scala language? [duplicate]
Floating point calculation is reasonably complex subject. This has to do with the binary representation of a floating point number, that doesn’t guarantee every possible number (obviously), to have an exact representation, which can lead to errors in operations, and yes, these errors can propagate. Here is a link on the subject, although it isn’t … Read more