るりまサーチ (Ruby 3.0)

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

別のキーワード

  1. date upto
  2. _builtin upto
  3. integer upto
  4. string upto
  5. macros log_upto

モジュール

検索結果

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

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

...[1, 1.0, 1.0]
# [2, 1.4142135623731, 2.0]
# [3, 1.73205080756888, 3.0]
# [4, 2.0, 4.0]
# [5, 2.23606797749979, 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.#...

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

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

...67, -5.0]
# [-4, -1.5874010519682, -4.0]
# [-3, -1.44224957030741, -3.0]
# [-2, -1.25992104989487, -2.0]
# [-1, -1.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....