PHP - Number: Calculating LogarithmsTag: number. calculation, logarithm Category:post: 16 Mar 2008 read: 39 PHP Number Tips - Part 13: If you want to find the logarithm of a number, you can use PHP's log( ) and log10( ) function such as:
Logarithms is useful when you are solving differential equations and most of the scientific calculators enable you to easily calculate the natural and base -10 logarithm of any number. PHP's log( ) and log10( ) is no different. To calculate the logarithm for any other base, you would normally use the logarithmic property log YX = log bX / log bY and in PHP, you can instead simply specify the base as a second parameter to log( ) as the following:
The exponential function does the reserve of the natural logarithmic function and is expressed in PHP through the exp( ) function as follows:
|
| | Give Your Opinion | Recommend |
|

