Logarithm
noun
say it: “LOG-uh-rith-um” /ˈlɔɡəˌrɪðəm/
The number of times you can cut a number in half before only one is left.
What is a logarithm, in Big-O?
In Big-O, a logarithm counts how many times you can halve something before only one is left. 1,000,000 can be halved about 20 times, so its logarithm is about 20. Textbooks call this the base-2 logarithm, log₂.
In a sentence
- “The logarithm of 1,000,000 is about 20, so guessing the middle finds any number up to a million in about 20 guesses.”
Level: Apprentice · More Software Development terms at this level
Updated