るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

Rational#quo(other) -> Rational | Float (15120.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 (20.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...