Floating Point Numbers (cont)
IEEE 754 standard ...
- scientific notation with fraction F and exponent E
- numbers have form F × 2E, where both F and E can be -ve
-
INFINITY = representation for ∞ and -∞ (e.g. 1.0/0)
-
NAN = representation for invalid value (e.g. sqrt(-1.0))
Fraction part is normalised (i.e. 1.2345×102 rather than 123.45)
In binary, exponent is represented relative to a bias value B
- if the unsigned exponent value is e, the actual value is e-B
|