Napier Turns Products into Sums
John Napier published logarithms in 1614 so that multiplying numbers could be done by adding their logs. This demo picks two numbers from 1 to 999, shows log10 of each, adds them, and takes the antilog to recover the product, with a slide-rule style scale.
log10(a) + log10(b) = log10(a × b) · 1.431364 + 1.623249 = 3.054613 · 10^3.054613 = 1134.0000 ≈ 1134
Move the two markers on the log scale. Their distances from 1 are log10(a) and log10(b). Laying the second distance end to end adds the logs, and the point you reach is the position of a × b. Addition replaces multiplication — the whole point of Napier’s tables and of the slide rule.
What you are seeing
On a logarithmic scale, the distance from 1 to a number x is log10(x). Multiplying by b slides the scale by log10(b).
The demo adds log10(a) and log10(b). The antilog, 10 raised to that sum, returns a × b, so the multiplication is performed by addition.
The two markers show the same operation as a slide rule: one length plus another length gives the product’s position.
Why it matters
Logarithms cut the labor of astronomy, navigation, and engineering for centuries and led directly to the slide rule. They remain the reason a log scale turns multiplicative growth into straight lines.
Complexity & details
Each logarithm and antilog is O(1). Looking up a table value is O(1) with interpolation; computing it directly is a fixed library call.
Frequently asked questions
Did Napier use base 10?+
No. Napier’s original logarithms came from a kinematic construction, not from powers of 10. Base-10 logarithms were developed later, chiefly by Henry Briggs, and are used here because they are easiest to read.
Why does adding logs multiply numbers?+
Because 10^(p+q) = 10^p × 10^q. If p = log10(a) and q = log10(b), then p + q is the log of a × b, so exponentiation recovers the product.