るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.016秒)
トップページ > バージョン:2.4.0[x] > クエリ:Math[x] > クエリ:rsqrt[x]

別のキーワード

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

ライブラリ

モジュール

検索結果

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

@todo

@todo

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

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

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

@todo

@todo

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