+ 18
Javascript
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/
3 Answers
+ 4
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.
+ 3
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
- 3
rec