Floating-point values can be represented using e-notation : Float « Number Data Type « JavaScript Tutorial






In e-notation, a number is represented by digits, followed by an e or an E, followed by the number of times to multiply it by 10.

var fNum = 3.125e7;

This notation represents the number 31250000.

You can get this value by converting the e-notation to a calculation: 3.125 * 10^7.

0.00000000000000003 can be written as 3e-17.

Here, 10 is raised to the -17 power.

By default, JavaScript converts any floating-point number with six or more leading zeros into e-notation.

Floating-point values are stored in a 64-bit IEEE 754 format.

Decimal values can have up to 17 decimal places.

After that, the values are truncated.

5.4.Float
5.4.1.Floating-Point Numbers
5.4.2.Floating-point values can be represented using e-notation
5.4.3.float point value
5.4.4.Adding the float point numbers together