Logarithm
A logarithm is the exponent to which a specified positive base other than one must be raised to produce a given positive number.
Statistics Every Programmer Needs
A logarithm is the exponent to which a specified base must be raised to obtain a given number.
- How it is used
- Uses base-10 logarithms to calculate Benford probabilities and transform numeric data for leading-digit analysis.
- How deep it goes
- Defines logarithmic scales and mantissas, then demonstrates Python calculations and statistical checks without developing proofs.
- Examples
- Demonstrates digit probabilities, population logarithms, mantissa extraction, summary statistics, and ranked mantissa plots.
- What you can do after
- Apply via NumPy to calculate base-10 logarithms, derive mantissas, and evaluate Benford-style numeric data.
Read how Statistics Every Programmer Needs explains logarithm →
Math for Web Design
A logarithm is the exponent to which a base must be raised to produce a specified number.
- How it is used
- Uses logarithms to create a CSS font-size scale from numbered steps.
- How deep it goes
- Defines the exponent relationship and works through a CSS formula without exploring logarithms beyond the scale.
- Examples
- Shows log(8, 2) = 3 and applies log() to heading and paragraph sizes across numbered steps.
- What you can do after
- Build it from scratch: create a logarithmic font-size scale with CSS log() and custom properties.
Grokking Data Structures
A logarithmic function grows proportionally to the logarithm of its input and therefore increases very slowly as input size grows.
- How it is used
- Uses logarithmic growth to compare how algorithm resources scale as input size increases.
- How deep it goes
- Defines slow growth and compares growth classes, stopping short of deriving logarithmic formulas or algorithm implementations.
- Examples
- Compares array searching, heapsort, pair generation, and subarray generation through estimated asymptotic running times.
- What you can do after
- Evaluate/understand an algorithm’s approximate order of growth and distinguish slow scaling from rapidly accelerating alternatives.
Also covered in
- Natural Language Processing in Action, Second Edition
- Grokking Algorithms, Second Edition
- DuckDB in Action
- Build AI Drug Discovery PipelinesIn early access (MEAP)
Related concepts
- natural logarithmincludes · The natural logarithm is the logarithm to base e, the inverse of the exponential function on positive real numbers.
- binary searchused by · Binary search is an algorithm that repeatedly halves an ordered search interval to locate a target or determine its position or boundary.
- mantissahas part · A mantissa is the value component of a numerical representation: the significand in floating-point notation or the fractional part of a common logarithm.
- Zipf's lawconfigured by · Zipf's law is an empirical statistical law stating that an item's frequency in a ranked distribution is approximately inversely proportional to its rank.
Questions about logarithm
What is logarithm?
A logarithm is the exponent to which a specified positive base other than one must be raised to produce a given positive number.
Which Manning books explain logarithm?
Statistics Every Programmer Needs, Math for Web Design and Grokking Data Structures.
What kinds of logarithm are there?
Kinds of logarithm include natural logarithm.
What are the parts of logarithm?
Logarithm includes characteristic and mantissa.
What is logarithm also called?
Logarithm is also called log or logarithmic function.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


