谁知道数学函数ln(x)java里怎么表示吗,就是log已e为底的那个阿

解决方案 »

  1.   

    Math.log(x)则可,看API文档即可,以后这种问题最好自己查查public static double log(double a)Returns the natural logarithm (base e) of a double value. Special cases: 
    If the argument is NaN or less than zero, then the result is NaN. 
    If the argument is positive infinity, then the result is positive infinity. 
    If the argument is positive zero or negative zero, then the result is negative infinity.
    A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic. 
    Parameters:
    a - a number greater than 0.0. 
    Returns:
    the value ln a, the natural logarithm of a.
      

  2.   

    利用数学公式阿,logaN = log xN / log xa