I love to program, and discover new tech.
Check out my <a href="http://stackoverflow.com/users/527776/larry-battle">stackoverflow</a> and <a href="https://github.com/LarryBattle">github</a> accounts.
I love to program, and discover new tech.
Check out my <a href="http://stackoverflow.com/users/527776/larry-battle">stackoverflow</a> and <a href="https://github.com/LarryBattle">github</a> accounts.
Warning: Undefined array key "layout" in /home/bateeqjg/public_html/news/wp-content/plugins/wp-about-author/wp-about-author.php on line 94
Throughout 2011 I have been loyal subscription holder to the scientific magazine New Scientist.
I love it how each week I’m presented with the latest scientific discoveries that blow my mind.
So, what is New Scientist?
New Scientist reports on the very latest science and technology news, putting discoveries and advances in the context of everyday life. New Scientist relates the advancements of human knowledge to the broader impacts on society and culture, making it essential reading for people who ask why. – From: Amazon.com
Schmidt recorded this movement using a motion tracking camera which fed numbers into his computer. What he was looking for was an equation describing the motion of the pendulums.
I love to program, and discover new tech.
Check out my <a href="http://stackoverflow.com/users/527776/larry-battle">stackoverflow</a> and <a href="https://github.com/LarryBattle">github</a> accounts.
Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/bateeqjg/public_html/news/wp-content/plugins/wp-syntax/wp-syntax.php on line 380
Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/bateeqjg/public_html/news/wp-content/plugins/wp-syntax/wp-syntax.php on line 380
Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/bateeqjg/public_html/news/wp-content/plugins/wp-syntax/wp-syntax.php on line 380
Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/bateeqjg/public_html/news/wp-content/plugins/wp-syntax/wp-syntax.php on line 380
Warning: Undefined array key "layout" in /home/bateeqjg/public_html/news/wp-content/plugins/wp-about-author/wp-about-author.php on line 94
Summary:
This tutorial will provide a simple overview of logarithms.
What are Logarithms?
Logarithms are used to determine the exponent needed to receive a certain value with a particular base.
Example: Log 100 = 2. Since 10^2 = 100.
Here’s a short video explaining logarithms more in-depth with a practical example.
The most common bases used for logarithms are base 10 and E. With base E logarithms normally referred to as the natural logarithm.
In Javascript, the function Math.log returns the natural logarithm of the argument instead of a base 10 logarithm. This can cause some confusion for those unaware of this fact.
So how can one use a different base other than E? Well, it simple. All you have to do is take the log of the value that you want, then divide that by the log of the desired based.
Like so.
Math.log( x )/Math.log( desiredBase );
Math.log( x ) / Math.log( desiredBase );
Here’s a user defined function that does the same operation.
/**
* @function Math.logx
* @purpose: To provide the logarithm for any base desired. Default base is 10.
* @returns a number.
*/Math.logx=function(x,base){return(Math.log(x))/(Math.log(base |10));}
/**
* @function Math.logx
* @purpose: To provide the logarithm for any base desired. Default base is 10.
* @returns a number.
*/
Math.logx = function(x,base) {
return (Math.log(x)) / (Math.log(base | 10 ));
}
And now, we can calculate log 10 as 2 instead of another number.
I love to program, and discover new tech.
Check out my <a href="http://stackoverflow.com/users/527776/larry-battle">stackoverflow</a> and <a href="https://github.com/LarryBattle">github</a> accounts.