るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.003秒)
トップページ > クラス:Bignum[x] > ライブラリ:rational[x]

キーワード

検索結果

Bignum#**(other) -> Integer | Float | Rational (3)

冪(べき)乗を計算します。other が 0 以下の場合、計算結果を Rational オブジェクトで返します。

...(べき)乗を計算します。other が 0 以下の場合、計算結果を
Rational
オブジェクトで返します。

(1<<32).rpower(2) # => 18446744073709551616
(1<<32).rpower(-2) # => Rational(1, 18446744073709551616)

@param other 自身を other 乗する数...

Bignum#power!(other) -> Integer | Float (3)

冪(べき)乗を計算します。

...冪(べき)乗を計算します。

@param other 自身を other 乗する数

rational
で再定義される前のBignum#**の別名です。
other が正または 0 の整数 (Integer) ならば、整数 (Integer) を、それ以外
なら、浮動小数 (Float) を返します。...

Bignum#quo(other) -> Rational (3)

商を計算して計算結果を Rational オブジェクトで返します。

...商を計算して計算結果を Rational オブジェクトで返します。

@param other 自身を割る数

例:

(1<<32).quo(2) # => Rational(2147483648, 1)...

Bignum#rpower(other) -> Integer | Float | Rational (3)

冪(べき)乗を計算します。other が 0 以下の場合、計算結果を Rational オブジェクトで返します。

...(べき)乗を計算します。other が 0 以下の場合、計算結果を
Rational
オブジェクトで返します。

(1<<32).rpower(2) # => 18446744073709551616
(1<<32).rpower(-2) # => Rational(1, 18446744073709551616)

@param other 自身を other 乗する数...