検索結果
先頭4件
-
Fixnum
# **(other) -> Integer | Float | Rational (3) -
冪(べき)乗を計算します。other が 0 以下の場合、計算結果を Rational オブジェクトで返します。
...)乗を計算します。other が 0 以下の場合、計算結果を
Rational オブジェクトで返します。
@param other 自身を other 乗する数
2.rpower(3) # => 8
2.rpower(-3) # => Rational(1, 8)... -
Fixnum
# power!(other) -> Integer | Float (3) -
冪(べき)乗を計算します。
...冪(べき)乗を計算します。
@param other 自身を other 乗する数
rationalで再定義される前のFixnum#**の別名です。
other が正または 0 の整数 (Integer) ならば、整数 (Integer) を、それ以外
なら、浮動小数 (Float) を返します。... -
Fixnum
# quo(other) -> Rational (3) -
商を計算して計算結果を Rational オブジェクトで返します。
...商を計算して計算結果を Rational オブジェクトで返します。
@param other 自身を割る数
例:
1.quo(2) # => Rational(1,2)... -
Fixnum
# rpower(other) -> Integer | Float | Rational (3) -
冪(べき)乗を計算します。other が 0 以下の場合、計算結果を Rational オブジェクトで返します。
...)乗を計算します。other が 0 以下の場合、計算結果を
Rational オブジェクトで返します。
@param other 自身を other 乗する数
2.rpower(3) # => 8
2.rpower(-3) # => Rational(1, 8)...
