るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.030秒)
トップページ > クラス:Rational[x] > クエリ:numeric[x] > クエリ:quo[x] > ライブラリ:ビルトイン[x]

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric %
  4. numeric eql?

検索結果

Rational#quo(other) -> Rational | Float (15116.0)

商を計算します。

...//emlist[例][ruby]{
r = Rational(3, 4)
r / 2 # => (3/8)
r / 2.0 # => 0.375
r / 0.5 # => 1.5
r / Rational(1, 2) # => (3/2)
r / 0 # => ZeroDivisionError
//}

@raise ZeroDivisionError other が 0 の時に発生します。

@see Numeric#quo...

Rational#/(other) -> Rational | Float (16.0)

商を計算します。

...//emlist[例][ruby]{
r = Rational(3, 4)
r / 2 # => (3/8)
r / 2.0 # => 0.375
r / 0.5 # => 1.5
r / Rational(1, 2) # => (3/2)
r / 0 # => ZeroDivisionError
//}

@raise ZeroDivisionError other が 0 の時に発生します。

@see Numeric#quo...