るりまサーチ

最速Rubyリファレンスマニュアル検索!
120件ヒット [1-100件を表示] (0.069秒)
トップページ > クエリ:Ruby[x] > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:-[x] > クエリ:at[x] > クラス:Complex[x]

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Complex#rationalize -> Rational (6314.0)

自身を Rational に変換します。

...自身を Rational に変換します。

@param eps 許容する誤差。常に無視されます。

@raise RangeError 虚部が実数か、0 ではない場合に発生します。

//emlist[例][ruby]{
Complex
(3).to_r # => (3/1)
Complex
(3, 2).to_r # => RangeError
//}...

Complex#rationalize(eps) -> Rational (6314.0)

自身を Rational に変換します。

...自身を Rational に変換します。

@param eps 許容する誤差。常に無視されます。

@raise RangeError 虚部が実数か、0 ではない場合に発生します。

//emlist[例][ruby]{
Complex
(3).to_r # => (3/1)
Complex
(3, 2).to_r # => RangeError
//}...

Complex#denominator -> Integer (6226.0)

分母を返します。

...と虚部の分母の最小公倍数を整数で返します。

1 2 3+4i <- numerator(分子)
-
+ -i -> ----
2 3 6 <- denominator(分母)

//emlist[例][ruby]{
Complex
('1/2+2/3i').denominator # => 6
Complex
(3).numerator # => 1
//}

@see Complex#numerator...

Complex#numerator -> Complex (6214.0)

分子を返します。

...分子を返します。

//emlist[例][ruby]{
Complex
('1/2+2/3i').numerator # => (3+4i)
Complex
(3).numerator # => (3+0i)
//}

@see Complex#denominator...

Complex#conjugate -> Complex (3220.0)

自身の共役複素数を返します。

...自身の共役複素数を返します。

//emlist[例][ruby]{
Complex
(1, 2).conj # => (1-2i)
//}...

絞り込み条件を変える

Complex#to_r -> Rational (3214.0)

自身を Rational に変換します。

...自身を Rational に変換します。

@param eps 許容する誤差。常に無視されます。

@raise RangeError 虚部が実数か、0 ではない場合に発生します。

//emlist[例][ruby]{
Complex
(3).to_r # => (3/1)
Complex
(3, 2).to_r # => RangeError
//}...

Complex#angle -> Float (274.0)

自身の偏角を[-π,π]の範囲で返します。

...を[-π,π]の範囲で返します。

//emlist[例][ruby]{
Complex
.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}

非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-
0.0 では値が変わります。

//emlist[例][ruby]{
Complex
(-1, 0)...
...3589793
Complex
(-1, -0).arg #=> 3.141592653589793
Complex
(-1, -0.0).arg #=> -3.141592653589793

Complex
(0, 0.0).arg #=> 0.0
Complex
(0, -0.0).arg #=> -0.0
Complex
(-0.0, 0).arg #=> 3.141592653589793
Complex
(-0.0, -0.0).arg #=> -3.14159...

Complex#arg -> Float (274.0)

自身の偏角を[-π,π]の範囲で返します。

...を[-π,π]の範囲で返します。

//emlist[例][ruby]{
Complex
.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}

非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-
0.0 では値が変わります。

//emlist[例][ruby]{
Complex
(-1, 0)...
...3589793
Complex
(-1, -0).arg #=> 3.141592653589793
Complex
(-1, -0.0).arg #=> -3.141592653589793

Complex
(0, 0.0).arg #=> 0.0
Complex
(0, -0.0).arg #=> -0.0
Complex
(-0.0, 0).arg #=> 3.141592653589793
Complex
(-0.0, -0.0).arg #=> -3.14159...

Complex#phase -> Float (274.0)

自身の偏角を[-π,π]の範囲で返します。

...を[-π,π]の範囲で返します。

//emlist[例][ruby]{
Complex
.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}

非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-
0.0 では値が変わります。

//emlist[例][ruby]{
Complex
(-1, 0)...
...3589793
Complex
(-1, -0).arg #=> 3.141592653589793
Complex
(-1, -0.0).arg #=> -3.141592653589793

Complex
(0, 0.0).arg #=> 0.0
Complex
(0, -0.0).arg #=> -0.0
Complex
(-0.0, 0).arg #=> 3.141592653589793
Complex
(-0.0, -0.0).arg #=> -3.14159...
<< 1 2 > >>