るりまサーチ

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

別のキーワード

  1. math cbrt
  2. _builtin cbrt
  3. cmath cbrt
  4. cmath cbrt!
  5. cbrt cmath

ライブラリ

検索結果

CMath (37.0)

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

...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
//...