完完全全的从jdk-doc上copy下来的,怎么会没有?要学会看文档static double sqrt(double a) 
          Returns the correctly rounded positive square root of a double value. 
sqrt
public static double sqrt(double a)Returns the correctly rounded positive square root 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 the same as the argument.
Otherwise, the result is the double value closest to the true mathetmatical square root of the argument value.
Parameters:
a - a double value. 
Returns:
the positive square root of a. If the argument is NaN or less than zero, the result is NaN.

解决方案 »

  1.   

    在哪个文档下面啊?java.math下的Bigdecimal怎么没有?
      

  2.   

    Math.pow(double,double);
    第一个参数是被开方的数
    第二个参数是开方的幂Math.sqrt(a)
    相当于
    Math.sqrt(a,2)
      

  3.   

    sorry
    Math.sqrt(a)
    相当于
    Math.pow(a,2)
      

  4.   

    真是懒得不行 这也问?api里不是有吗
      

  5.   

    xingzhe2001 问的是开方,不是平方,应该是Math.sqrt(a,0.5)!
      

  6.   

    没办法,俺是菜鸟嘛,终于找到了,在java.lang.math下,谢各位,有什么办法能在不熟悉api的情况下迅速的查到我需要的函数呢?比如搜索什么的