Numerical Methods and Machine Precision

Overview


Most modern computer languages (Javascript included) use double precision (64-bit) words for the representation of numbers. That is to say, the computer only has 64 bits available to represent any number. However, 64 bits can only represent a finite fixed number of numbers. Whenver, the computer needs to represent a number for which it does not have a 54 bit encoding, the best it can do is replace the needed number with the 64 bit representation of the closest number to the desired number.

In actuality, the computer will represent a number as
{% x = \pm n \times 2^e %}
see Gilli

Numeric Representation


Machine Precision


Machine precision is defined to the smallest number {% \epsilon_{machine} %} such that
{% float(1+\epsilon_{machine}) > 1 %}
see Gilli