Ruby 1.9.2 Reference Manual > All Libraries > Builtin Library > module Math > sqrt
sqrt(x) -> Floatx の平方根を返します。
sqrt(a) -> Numeric [redefined by mathn]
[TODO]
a の正の平方根を返します。 a が Complex の時は、Complex を返します。 a が負の時は、a を正にして、その平方根を Complex の虚数部に入れて返します。 それ以外は、Math.rsqrt の結果を返します。