Log Function

rcgomez11

Member
Good day ProgressTalkers,
I just passed a code/function which is very new to me and I know you can help me. I'm thinking, what's the use of log(number, optional base) function?
I'm wondering if it behaves like an audit trail that list all events a user done to the system or something that helps an administrator to analyze.
Looking to hear from all you soon, thanks in advance.

Sincerely,
Romel Gomez
 

TomBascom

Curmudgeon
"logarithm" ;)

http://en.wikipedia.org/wiki/Logarithm

The logarithm of a number is the exponent by which another fixed value, the base, has to be raised to produce that number. For example, the logarithm of 1000 to base 10 is 3, because 1000 is 10 to the power 3: 1000 = 103 = 10 × 10 × 10. More generally, if x = by, then y is the logarithm of x to base b, and is written logb(x), so log10(1000) = 3.

Logarithms were introduced by John Napier in the early 17th century as a means to simplify calculations. They were rapidly adopted by scientists, engineers, and others to perform computations more easily and rapidly, using slide rules and logarithm tables. These devices rely on the fact—important in its own right—that the logarithm of a product is the sum of the logarithms of the factors:

log_b(xy) = log_b (x) + log_b (y)

The present-day notion of logarithms comes from Leonhard Euler, who connected them to the exponential function in the 18th century.

The logarithm to base b = 10 is called the common logarithm and has many applications in science and engineering. The natural logarithm has the constant e (≈ 2.718) as its base; its use is widespread in pure mathematics, especially calculus. The binary logarithm uses base b = 2 and is prominent in computer science.

Logarithmic scales reduce wide-ranging quantities to smaller scopes. For example, the decibel is a logarithmic unit quantifying sound pressure and voltage ratios. In chemistry, pH and pOH are logarithmic measures for the acidity of an aqueous solution. Logarithms are commonplace in scientific formulas, and in measurements of the complexity of algorithms and of geometric objects called fractals. They describe musical intervals, appear in formulas counting prime numbers, inform some models in psychophysics, and can aid in forensic accounting.

In the same way as the logarithm reverses exponentiation, the complex logarithm is the inverse function of the exponential function applied to complex numbers. The discrete logarithm is another variant; it has applications in public-key cryptography.
 

TomBascom

Curmudgeon
"logarithm" ;)

http://en.wikipedia.org/wiki/Logarithm

The logarithm of a number is the exponent by which another fixed value, the base, has to be raised to produce that number. For example, the logarithm of 1000 to base 10 is 3, because 1000 is 10 to the power 3: 1000 = 103 = 10 × 10 × 10. More generally, if x = by, then y is the logarithm of x to base b, and is written logb(x), so log10(1000) = 3.

Logarithms were introduced by John Napier in the early 17th century as a means to simplify calculations. They were rapidly adopted by scientists, engineers, and others to perform computations more easily and rapidly, using slide rules and logarithm tables. These devices rely on the fact—important in its own right—that the logarithm of a product is the sum of the logarithms of the factors:

log_b(xy) = log_b (x) + log_b (y)

The present-day notion of logarithms comes from Leonhard Euler, who connected them to the exponential function in the 18th century.

The logarithm to base b = 10 is called the common logarithm and has many applications in science and engineering. The natural logarithm has the constant e (≈ 2.718) as its base; its use is widespread in pure mathematics, especially calculus. The binary logarithm uses base b = 2 and is prominent in computer science.

Logarithmic scales reduce wide-ranging quantities to smaller scopes. For example, the decibel is a logarithmic unit quantifying sound pressure and voltage ratios. In chemistry, pH and pOH are logarithmic measures for the acidity of an aqueous solution. Logarithms are commonplace in scientific formulas, and in measurements of the complexity of algorithms and of geometric objects called fractals. They describe musical intervals, appear in formulas counting prime numbers, inform some models in psychophysics, and can aid in forensic accounting.

In the same way as the logarithm reverses exponentiation, the complex logarithm is the inverse function of the exponential function applied to complex numbers. The discrete logarithm is another variant; it has applications in public-key cryptography.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Fun fact: given the DB block size and a table's mean record size you can use the logarithm function to calculate that table's ideal area records-per-block setting.
 
Top