Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I learn about logarithms? [closed]

Tags:

I hear logarithms mentioned quite a lot in the programming context. They seem to be the solution to many problems and yet I can't seem to find a real-world way of making use of them. I've read the Wikipedia entry and that, quite frankly, leaves me none the wiser.

So, where can I learn about the real-world programming problems that logarithms solve? Has anyone got any examples of problems they faced that were solved by implementing a logarithm?

like image 321
Charles Roper Avatar asked Sep 23 '08 15:09

Charles Roper


People also ask

Where logarithms are used in real life?

Logarithms are used for measuring the magnitude of earthquakes. Logarithms are used for measuring the noise levels in dBs (decibels). They are used to measure the pH level of chemicals. Logarithms are used in radioactivity, mainly to detect the half life of a radioactive element.

Can logarithms cancel out?

Explanation: One of the properties of logs is the ability to cancel out terms based on the base of the log. Since the base of the log is 10 we can simplify the 100 to 10 squared. The log base 10 and the 10 cancel out, leaving you with the value of the exponent, 2 as the answer.


1 Answers

Logarithms in programming are also frequently used in describing the efficiency of an algorithm using Big O notation.

For instance, a binary search algorithm would have a worst case scenario of O(log(n)) (on a sorted set), whereas a linear search's worst case is O(n)

like image 110
Chris Marasti-Georg Avatar answered Oct 05 '22 00:10

Chris Marasti-Georg