19件ヒット
[1-19件を表示]
(0.032秒)
別のキーワード
種類
- クラス (11)
- インスタンスメソッド (8)
クラス
- Numeric (8)
検索結果
-
Numeric
# finite? -> bool (18127.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 (62.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...。
=> ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
% |......- o o o - -
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
<< |......- o o - - -
Numeric Integer Fixnum Bignum Float Rational Complex
-------------------------------------------------------------------------------------------
abs |......てください。
=> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
% | o o......o
< | - o o - -
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
<< | - o......-
^ | - o - - -
Numeric Integer Float Rational Complex
--------------------------------------------------------------------------------
abs | o o...