るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. _builtin typeerror
  2. sort typeerror
  3. dump typeerror
  4. typeerror _builtin
  5. $~ typeerror

モジュール

キーワード

検索結果

CMath.#sqrt(z) -> Float | Complex (54382.0)

z の平方根を返します。

...z の平方根を返します。

@param z 数値

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

//emlist[例][ruby]{
require "cmath"
CMath
.sqrt(-1) # => (0+1.0i)
CMath
.sqrt(1)# => 1.0
CMath
.sqrt(Complex(0, 8))# => (2.0+2.0i)
//}...

CMath.#sqrt!(x) -> Float (18430.0)

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

...に発生します。

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

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

//emlist[例][ruby]{
require "cmath"
CMath
.sqrt!(4.0) # => 2.0
CMath
.sqrt!(9.0) # => 3.0
//}

@see Math.#sqrt...

CMath.#exp!(x) -> Float (43.0)

実数 x の指数関数(Math::E の x 乗)の値を返します。 Math.#exp のエイリアスです。

...た場合に発生します。

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

//emlist[例][ruby]{
require "cmath"
CMath
.exp!(0) # => 1
CMath
.exp!(0.5) # => Math.sqrt(Math::E)
CMath
.exp!(1) # => Math::E
CMath
.exp!(2) # => Math::E ** 2
//}

@see Math.#exp...