Home
Numeric Calculus - Floating Point

Transcription of the handwritten notes
Floating point representation
Standard way computers handle real numbers.
The mathematical theorem
A floating-point number is a sum of powers of 2. Any real number x can be approximated by
x = (−1)s × (1 + f) × 2e − B
Where:
- s: determines if the number is positive or negative.
- f (fraction/mantissa): binary representation to the precision, usually a fraction.
- e: the exponent, an unsigned integer that determines the magnitude.
- B: bias, a constant subtracted from the exponent so we can represent both very large and very small numbers.