Decimal expansion Created 2026-10-14 Updated 2026-11-05
A decimal expansion writes a nonnegative real number using decimal digits at successive powers of ten:Nonnegative indices describe the integer part, and negative indices describe the fractional part. For a negative real number, add a minus sign to the expansion of its positive magnitude. A terminating decimal has a zero tail; a general decimal expansion can require infinitely many fractional digits.
An infinite tail of nines can duplicate a terminating expansion. For example, the geometric series gives . The usual uniqueness convention excludes a final infinite tail of nines, and redundant leading zeros are ignored.
For a nonnegative integer , only finitely many nonnegative powers are needed: . This makes divisibility tests into polynomial calculations modulo the proposed divisor. Since ,Thus is divisible by exactly when its alternating digit sum is divisible by . That sum need not be literally zero: for , it is , and .