1615件ヒット
[101-200件を表示]
(0.102秒)
ライブラリ
クラス
- BigDecimal (84)
- Bignum (12)
- Complex (144)
-
Enumerator
:: ArithmeticSequence (49) - Fixnum (9)
- Float (48)
- Integer (288)
- Matrix (84)
-
Matrix
:: LUPDecomposition (24) -
Net
:: FTP (24) -
Net
:: HTTP (7) - Numeric (611)
- Object (12)
- OptionParser (144)
- Range (11)
- Rational (28)
- Vector (12)
モジュール
- Kernel (24)
キーワード
- % (36)
- * (48)
- ** (16)
- + (12)
- +@ (12)
- - (12)
- -@ (12)
-
/ (84) - <=> (12)
- [] (30)
- abs (24)
- abs2 (24)
- angle (12)
- arg (12)
- begin (7)
- ceil (24)
-
check
_ signedness (24) - clone (12)
- coerce (24)
- conj (12)
- conjugate (12)
- denominator (12)
- det (24)
- determinant (24)
- div (24)
- divmod (42)
- downto (24)
- end (7)
- eql? (12)
- fdiv (30)
- finite? (9)
- first (14)
- floor (36)
- imag (24)
- imaginary (24)
- infinite? (9)
- integer? (12)
- last (14)
- magnitude (24)
- modulo (36)
- negative? (10)
- nonzero? (12)
- numerator (12)
- on (144)
-
open
_ timeout (12) - phase (12)
- polar (24)
- positive? (10)
- pow (24)
- quo (48)
-
read
_ timeout (12) - real (24)
- real? (36)
- rect (24)
- rectangular (24)
- remainder (39)
- round (24)
- size (11)
- step (100)
- times (24)
-
to
_ c (12) -
to
_ i (12) -
to
_ int (12) - truncate (36)
- upto (24)
-
write
_ timeout (7) - zero? (12)
検索結果
先頭5件
-
Numeric
# fdiv(other) -> Float | Complex (36137.0) -
self を other で割った商を Float で返します。 ただし Complex が関わる場合は例外です。 その場合も成分は Float になります。
...
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@param other 自身を割る数を指定します。
//emlist[例][ruby]{
1.fdiv(3) #=> 0.3333333333333333
Complex(1, 1).fdiv 1 #=> (1.0+1.0i)
1.fdiv Complex(1, 1) #=> (0.5-0.5i)
/....../}
@see Numeric#quo... -
Numeric
# finite? -> bool (36125.0) -
self の絶対値が有限値の場合に true を、そうでない場合に false を返します。
...値の場合に true を、そうでない場合に false を返します。
//emlist[例][ruby]{
10.finite? # => true
Rational(3).finite? # => true
Float::INFINITY.finite? # => false
Float::INFINITY.is_a?(Numeric) # => true
//}
@see Numeric#infinite?... -
Numeric
# imag -> 0 (36125.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 (36125.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
# integer? -> bool (36125.0) -
自身が Integer かそのサブクラスのインスタンスの場合にtrue を返し ます。そうでない場合に false を返します。
... Integer かそのサブクラスのインスタンスの場合にtrue を返し
ます。そうでない場合に false を返します。
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
//emlist[例][ruby]{
(1.0).integer? #=> false
(1).int......eger? #=> true
//}
@see Numeric#real?... -
Numeric
# div(other) -> Integer (36113.0) -
self を other で割った整数の商 q を返します。
...りは Numeric#modulo で求められます。
div はメソッド / を呼びだし、floorを取ることで計算されます。
メソッド / の定義はサブクラスごとの定義を用います。
@param other 自身を割る数を指定します。
//emlist[例][ruby]{
p 3.div(2) # =>......1
p (-3).div(2) # => -2
p (-3.0).div(2) # => -2
//}... -
Numeric
# negative? -> bool (36113.0) -
self が 0 未満の場合に true を返します。そうでない場合に false を返します。
...self が 0 未満の場合に true を返します。そうでない場合に false を返します。
//emlist[例][ruby]{
-1.negative? # => true
0.negative? # => false
1.negative? # => false
//}
@see Numeric#positive?... -
Numeric
# positive? -> bool (36113.0) -
self が 0 より大きい場合に true を返します。そうでない場合に false を返します。
...self が 0 より大きい場合に true を返します。そうでない場合に false を返します。
//emlist[例][ruby]{
1.positive? # => true
0.positive? # => false
-1.positive? # => false
//}
@see Numeric#negative?... -
Numeric
# rect -> [Numeric , Numeric] (33621.0) -
[self, 0] を返します。
...[self, 0] を返します。
//emlist[例][ruby]{
1.rect # => [1, 0]
-1.rect # => [-1, 0]
1.0.rect # => [1.0, 0]
-1.0.rect # => [-1.0, 0]
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Complex#rect... -
Numeric
# rectangular -> [Numeric , Numeric] (33621.0) -
[self, 0] を返します。
...[self, 0] を返します。
//emlist[例][ruby]{
1.rect # => [1, 0]
-1.rect # => [-1, 0]
1.0.rect # => [1.0, 0]
-1.0.rect # => [-1.0, 0]
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Complex#rect...