PHP log() functionThe log() function is inbuilt php function, which is used to find the natural logarithm of a number or the logarithm of number to base. Syntax:
Note: We get output as LOG of X if the input number with Base Y (optional) .Example1Output: Your number is: 2 By using log() function your number is : 0.69314718055995 Example2Output: Your number is: 2.7183 By using log() function your number is : 1.000006684914 Example3Output: Your number is: -1 By using log() function your number is : NAN Example4Output: Your number is: 0 By using log() function your number is : -INF Note: Example of LOG() with Base.Example5Output: Your number is: log(5,2) By using log() function your number is : 2.3219280948874 Example6Output: Your number is: log(5,10) By using log() function your number is : 0.69897000433602 Example7Output: Your number is: log(5,2.7183) By using log() function your number is : 1.609427153552
Next TopicPHP Math
|