るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.016秒)
トップページ > クラス:Rational[x] > クエリ:Float[x] > クエリ:fdiv[x]

別のキーワード

  1. _builtin float
  2. float to_d
  3. json float
  4. float rationalize
  5. fiddle type_float

ライブラリ

検索結果

Rational#fdiv(other) -> Float (18249.0)

self を other で割った商を Float で返します。 other に虚数を指定することは出来ません。

... Float で返します。
other に虚数を指定することは出来ません。

@param other 自身を割る数

//emlist[例][ruby]{
Rational
(2, 3).fdiv(1) # => 0.6666666666666666
Rational
(2, 3).fdiv(0.5) # => 1.3333333333333333
Rational
(2).fdiv(3) # => 0.6666666666666666

Rational
(1...
...).fdiv(Complex(1, 0)) # => 1.0
Rational
(1).fdiv(Complex(0, 1)) # => RangeError
//}...