949件ヒット
[1-100件を表示]
(0.118秒)
ライブラリ
- ビルトイン (558)
- bigdecimal (12)
- cmath (120)
-
json
/ add / complex (24) - mathn (8)
- matrix (146)
クラス
モジュール
- BigMath (12)
- CMath (120)
- Enumerable (24)
- Kernel (36)
- Math (8)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (6) - Numeric (12)
- Rational (12)
- Ruby用語集 (12)
- abs (12)
- abs2 (12)
- acos (6)
- acosh (6)
- angle (24)
- antisymmetric? (7)
- arg (24)
- asin (6)
- asinh (6)
- atan (6)
- atan2 (6)
- atanh (6)
- between? (12)
- cbrt (6)
- clamp (12)
- conj (12)
- conjugate (36)
- cos (6)
- cosh (6)
- denominator (24)
- exp (6)
- fdiv (30)
- imag (36)
- imaginary (36)
-
json
/ add / complex (12) -
json
_ create (12) - log (24)
- log10 (6)
- log2 (6)
- magnitude (24)
-
marshal
_ dump (12) - mathn (4)
- matrix (12)
- norm (12)
- numerator (24)
- phase (24)
- polar (36)
- quo (12)
- r (12)
- rationalize (24)
- real (36)
- real? (36)
- rectangular (36)
- rsqrt (4)
- sin (6)
- sinh (6)
-
skew
_ symmetric? (7) -
slice
_ before (24) - sqrt (10)
- tan (6)
- tanh (6)
-
to
_ c (12) -
to
_ f (12) -
to
_ json (12) -
to
_ r (12) - tr (12)
- trace (12)
検索結果
先頭5件
-
Complex
. polar(r , theta = 0) -> Complex (27235.0) -
絶対値が r、偏角が theta である Complex クラスのオブジェクトを生成します。
...r、偏角が theta である Complex クラスのオブジェクトを生成します。
@param r 生成する複素数の絶対値。
@param theta 生成する複素数の偏角。単位はラジアンです。省略した場合は 0 です。
//emlist[例][ruby]{
Complex.polar(2.0)......# => (2.0+0.0i)
Complex.polar(2.0, 0) # => (2.0+0.0i)
Complex.polar(2.0, Math::PI) # => (-2.0+2.4492127076447545e-16i)
//}... -
Complex
# marshal _ dump -> Array (27228.0) -
Marshal.#load のためのメソッドです。 Complex::compatible#marshal_load で復元可能な配列を返します。
...Marshal.#load のためのメソッドです。
Complex::compatible#marshal_load で復元可能な配列を返します。
2.0 以降では Marshal.#load で 1.8 系の Complex オブジェクト
を保存した文字列も復元できます。
[注意] Complex::compatible は通常の方法で... -
Complex
# numerator -> Complex (27219.0) -
分子を返します。
...分子を返します。
//emlist[例][ruby]{
Complex('1/2+2/3i').numerator # => (3+4i)
Complex(3).numerator # => (3+0i)
//}
@see Complex#denominator... -
Complex
. json _ create(hash) -> Complex (27217.0) -
JSON のオブジェクトから Complex のオブジェクトを生成して返します。
...JSON のオブジェクトから Complex のオブジェクトを生成して返します。
@param hash 実部をキー 'r'、虚部をキー 'i' に持つハッシュを指定します。... -
Complex
# rationalize -> Rational (27212.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 (27212.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
@param eps 許容する誤差。常に無視されます。
@raise RangeError 虚部が実数か、0 ではない場合に発生します。
//emlist[例][ruby]{
Complex(3).to_r # => (3/1)
Complex(3, 2).to_r # => RangeError
//}... -
Complex
# real? -> false (27200.0) -
常に false を返します。
...常に false を返します。
//emlist[例][ruby]{
(2+3i).real? # => false
(2+0i).real? # => false
//}
@see Numeric#real?... -
Complex
# angle -> Float (27148.0) -
自身の偏角を[-π,π]の範囲で返します。
...{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}
非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。
//emlist[例][ruby]{
Complex(-1, 0).arg #=> 3.141592653589793
Complex(-1, -0).ar......#=> 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.141592653589793
//}
@see Numeric#arg... -
Complex
# arg -> Float (27148.0) -
自身の偏角を[-π,π]の範囲で返します。
...{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}
非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。
//emlist[例][ruby]{
Complex(-1, 0).arg #=> 3.141592653589793
Complex(-1, -0).ar......#=> 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.141592653589793
//}
@see Numeric#arg...