In a lesson they included this sentence as a note: "JavaScript numbers are always stored as double precision floating point numbers." So I don't really get it what they mean by "double precision floating point" Comments sections are confusing there 😞 It would be amazing if someone explains it😁 Thank you for spending your time! Lesson (section 2)👇 https://www.sololearn.com/learn/JavaScript/1129/

7/12/2019 10:33:55 PM

Mr. 🍊range

3 Answers

New Answer


That would mean it uses 8 bytes for integer and non-integer numbers. Other languages like C, Java etc. also have the less precise (4 byte) single precision floating point numbers which JS doesn't.


A double-precision floating point number is a floating point number with the size of 8 bytes. Basically floating point is a number that can store fractional value, like 1.37, 0.153, 82.17, and so on. So, basically, floating point is a real number, not just an integer, and the double precision is used to indicate it's size, which is 8 bytes You can refer to https://en.m.wikipedia.org/wiki/Floating-point_arithmetic https://en.m.wikipedia.org/wiki/Double-precision_floating-point_format