るりまサーチ

最速Rubyリファレンスマニュアル検索!
55件ヒット [1-55件を表示] (0.035秒)

別のキーワード

  1. bigdecimal sqrt
  2. _builtin sqrt
  3. math sqrt
  4. bigdecimal/math sqrt
  5. bigmath sqrt

モジュール

キーワード

検索結果

Math.#sqrt(x) -> Float (18122.0)

x の非負の平方根(principal square root)を返します。

...@raise RangeError xに実数以外の数値を指定した場合に発生します。

//emlist[例][ruby]{
0.upto(10) {|x|
p [x, Math.sqrt(x), Math.sqrt(x)**2]
}
# => [0, 0.0, 0.0]
# [1, 1.0, 1.0]
# [2, 1.4142135623731, 2.0]
# [3, 1.73205080756888, 3.0]
# [4, 2.0, 4.0]
# [5, 2.2360679...
...7749979, 5.0]
# [6, 2.44948974278318, 6.0]
# [7, 2.64575131106459, 7.0]
# [8, 2.82842712474619, 8.0]
# [9, 3.0, 9.0]
# [10, 3.16227766016838, 10.0]
//}

@see Integer.sqrt, Math.#cbrt...

Math.#hypot(x, y) -> Float (19.0)

sqrt(x*x + y*y) を返します。

...
sqrt
(x*x + y*y) を返します。

この値は x, y を直交する 2 辺とする直角三角形の斜辺(hypotenuse)の長さです。

@param x 実数
@param y 実数

@raise TypeError 引数のどちらかに数値以外を指定した場合に発生します。

@raise RangeError 引数...

Math.#acosh(x) -> Float (9.0)

x の逆双曲線余弦関数(area hyperbolic cosine)の値を返します。

...x の逆双曲線余弦関数(area hyperbolic cosine)の値を返します。

=== 定義

acosh(x) = log(x + sqrt(x * x - 1)) [x >= 1]

@param x x >= 1 の範囲の実数

@raise TypeError x に数値以外を指定した場合に発生します。

@raise Math::DomainError x に範囲外...

Math.#asinh(x) -> Float (9.0)

x の逆双曲線正弦関数(area hyperbolic sine)の値を返します。

...x の逆双曲線正弦関数(area hyperbolic sine)の値を返します。

=== 定義

asinh(x) = log(x + sqrt(x * x + 1))

@param x 実数

@raise TypeError x に数値以外を指定した場合に発生します。

@raise RangeError x に実数以外の数値を指定した場合に...

Math.#cbrt(x) -> Float (9.0)

x の立方根(cubic root)を返します。

....0, -1.0]
# [0, 0.0, 0.0]
# [1, 1.0, 1.0]
# [2, 1.25992104989487, 2.0]
# [3, 1.44224957030741, 3.0]
# [4, 1.5874010519682, 4.0]
# [5, 1.7099759466767, 5.0]
# [6, 1.81712059283214, 6.0]
# [7, 1.91293118277239, 7.0]
# [8, 2.0, 8.0]
# [9, 2.0800838230519, 9.0]
//}

@see Math.#sqrt...

絞り込み条件を変える