るりまサーチ

最速Rubyリファレンスマニュアル検索!
8件ヒット [1-8件を表示] (0.010秒)
トップページ > クエリ:Math[x] > ライブラリ:mathn[x]

別のキーワード

  1. math log
  2. math sqrt
  3. _builtin math
  4. bigdecimal/math e
  5. bigdecimal/math pi

モジュール

キーワード

検索結果

Math.#sqrt(a) -> Numeric (21008.0)

@todo

...@todo

a の正の平方根を返します。
a が Complex の時は、Complex を返します。
a が負の時は、a を正にして、その平方根を Complex の虚数部に入れて返します。
それ以外は、Math.rsqrt の結果を返します。...

Math.#rsqrt(a) -> Numeric (21002.0)

@todo

@todo

複素数を考慮しないので、負の数や Complex をあたえないでください。

a が Float の時は、Float を返します。
それ以外の時、平方根が有理数であれば、Rational または Integer を返します。
無理数であれば、Float を返します。