るりまサーチ

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

別のキーワード

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

ライブラリ

モジュール

検索結果

CMath.#cbrt!(x) -> Float (21122.0)

実数 x の立方根を返します。Math.#cbrt のエイリアスです。

...Math.#cbrt のエイリアスです。

@param x 実数

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

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

//emlist[例][ruby]{
require "cmath"
CMath.cbrt!(8.0)# => 2.0
CMath.cbrt!(-8....
...0) # => -2.0
//}

@see Math.#cbrt...

CMath (6024.0)

複素数演算をサポートするモジュールです。

...トするモジュールです。

Math
モジュールの複素数版です。同名のメソッドを複素数対応します。
従来の計算結果が必要な場合は、「メソッド名!」の形式で呼び出します。

//emlist[例][ruby]{
require "cmath"

# 複素数の範囲の立方...
...= exp(1/3 πi)
CMath.cbrt(-1) # => (0.5000000000000001+0.8660254037844386i)

# 実数の範囲の立方根
Math
.cbrt(-1) # => -1.0

include CMath

# レシーバー無しで使える
cbrt(-1) # => (0.5000000000000001+0.8660254037844386i)

# cbrt! Math.cbrt のエイリアス
cbrt!
(-1) # => -1.0...