In the Chrome Javascript Console I type the following:
3.1 * 3.68
And the result returned is:
11.408000000000001
Why is the result not:
11.408
Floating point errors are quite normal, this is due to the problems inherent in representing some floating point numbers in binary.
Read this: What Every Computer Scientist Should Know About Floating-Point Arithmetic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With