1件ヒット
[1-1件を表示]
(0.048秒)
ライブラリ
- ビルトイン (1)
検索結果
-
Rational
# to _ f -> Float (24409.0) -
自身の値を最も良く表現する Float に変換します。
...{
Rational(2).to_f # => 2.0
Rational(9, 4).to_f # => 2.25
Rational(-3, 4).to_f # => -0.75
Rational(20, 3).to_f # => 6.666666666666667
Rational(1, 10**1000).to_f # => 0.0
Rational(-1, 10**1000).to_f # => -0.0
Rational(10**1000).to_f # => Infinity
Rational(...