るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.060秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

クラス

検索結果

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

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

self を 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)...