Tag Archives: floating point number

Why 0.1+0.2=0.30000000000000004(floating point number addition)

From the how-to-store-numbers-in-javascript, we know that Now we get 0.2 by the same way, Now we operate by the following steps:

Posted in Internet Technology | Tagged , | Comments Off on Why 0.1+0.2=0.30000000000000004(floating point number addition)

How to store numbers in Javascript

We know that all numbers in Javascript are stored in 64-bit format IEEE-754, also known as “double precision”,whatever the types int or float. When you see a number for example 0.1, actually not 0.1, it is (0.1).toPrecision(30) => 0.100000000000000005551115123126. The … Continue reading

Posted in Internet Technology | Tagged , , , , | Comments Off on How to store numbers in Javascript