Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Math.log Function

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 42
    Comment on it

    Math.log() function compute a natural logarithm. The method returns the natural logarithm (base E) of a number if the value of number is negative, the return value is always NaN or If the number is 0, the function returns -Infinity.

    Syntax

    Math.log( x ) ;
    x  is a numbers.
    

    For Example

    var value = Math.log(10);
    document.write("First Test Value : " + value ); 
    
    var value = Math.log(0);
    document.write("<br />Second Test Value : " + value ); 
    
    var value = Math.log(-1);
    document.write("<br />Third Test Value : " + value ); 
    
    var value = Math.log(100);
    document.write("<br />Fourth Test Value : " + value ); 
    

    The output for this

    First Test Value : 2.302585092994046
    Second Test Value : -Infinity
    Third Test Value : NaN
    Fourth Test Value : 4.605170185988092 
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: