249件ヒット
[101-200件を表示]
(0.022秒)
検索結果
先頭5件
-
Numeric
# conjugate -> Numeric (9124.0) -
常に self を返します。
...常に self を返します。
自身が Complex かそのサブクラスのインスタンスの場合は、自身の共役複素数(実数の場合は常に自身)を返します。
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
//emli......st[例][ruby]{
10.conj # => 10
0.1.conj # => 0.1
(2/3r).conj # => (2/3)
//}
@see Complex#conj... -
Numeric
# real -> Numeric (9123.0) -
自身を返します。
...す。
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
//emlist[例][ruby]{
10.real # => 10
-10.real # => -10
0.1.real # => 0.1
Rational(2, 3).real # => (2/3)
//}
@see Numeric#imag、Complex#real... -
Numeric
# / (other) -> Numeric (9117.0) -
除算の演算子です。 self を other で割った商を返します。
...除算の演算子です。
self を other で割った商を返します。
Numeric では定義されておらず、サブクラスの実装によります。
@see Integer#/, Float#/, Rational#/, Complex#/... -
Numeric
# -@ -> Numeric (9111.0) -
単項演算子の - です。 self の符号を反転させたものを返します。
...単項演算子の - です。
self の符号を反転させたものを返します。
このメソッドは、二項演算子 - で 0 - self によって定義されています。
@see Integer#-@、Float#-@、Rational#-@、Complex#-@... -
Numeric
# real? -> bool (9038.0) -
常に true を返します。(Complex またはそのサブクラスではないことを意味します。)
...常に true を返します。(Complex またはそのサブクラスではないことを意味します。)
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
//emlist[例][ruby]{
10.real? # => true
-10.real? # =>......true
0.1.real? # => true
Rational(2, 3).real? # => true
//}
@see Numeric#integer?、Complex#real?... -
Numeric
# infinite? -> nil (9032.0) -
常に nil を返します。 自身が Float かComplex、もしくはそのサブクラスのインスタンスの場合は、self の絶対値が負の無限大の場合に-1を、正の無限大の場合に1を、有限値の場合に nil を返します。
...常に nil を返します。
自身が Float かComplex、もしくはそのサブクラスのインスタンスの場合は、self の絶対値が負の無限大の場合に-1を、正の無限大の場合に1を、有限値の場合に nil を返します。
//emlist[例][ruby]{
10.infinite?......# => nil
(3r).infinite? # => nil
//}
@see Numeric#finite?、Float#infinite?、Complex#infinite?... -
Numeric
# imag -> 0 (9022.0) -
常に 0 を返します。
...常に 0 を返します。
//emlist[例][ruby]{
12.imag # => 0
-12.imag # => 0
1.2.imag # => 0
-1.2.imag # => 0
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Numeric#real、Complex#imag... -
Numeric
# imaginary -> 0 (9022.0) -
常に 0 を返します。
...常に 0 を返します。
//emlist[例][ruby]{
12.imag # => 0
-12.imag # => 0
1.2.imag # => 0
-1.2.imag # => 0
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Numeric#real、Complex#imag... -
Numeric
# angle -> 0 | Math :: PI (9016.0) -
自身の偏角(正の数なら 0、負の数なら Math::PI)を返します。
...自身の偏角(正の数なら 0、負の数なら Math::PI)を返します。
//emlist[例][ruby]{
1.arg # => 0
-1.arg # => 3.141592653589793
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Complex#arg...