Understanding How Computers Store Floating-Point Numbers
IEEE 754 represents a floating-point value as:
V = (-1)^s × M × 2^E
s: sign bit; 0 means positive and 1 means negative
M: significand represented as a binary fraction
E: exponent that scales the significand by a power of two
Floating-point values are finite approximations of real numbers. Many decimal fractions cannot be represented exactly in binary, which explains rounding errors, overflow, underflow, and why financial systems often use decimal or fixed-point arithmetic.