Floating Point
Floating point representations
Floating point representations are a special case, where we trade precision for the ability to represent numbers in a larger range.
There are some important points to consider:
-
Never use floating point values were exact values are critical (eg, finance applications, safety critical systems).
-
Operations involving floating point numbers can result in precision loss.
-
Care must be taken when comparing floating point values.
Representing Numbers
Average colour of a pixel
\[a \times 2^b\]
- a
-
A real number; positive or negative, with 1 ⇐ |a| < 2
- b
-
Exponent; an integer can be positive, negative or zero
-
IEEE754 is the most common standard for storing floating point numbers.
-
Last updated 0001-01-01