self ** other -> Fixnum | Bignum | Float[permalink][rdoc]-
算術演算子。冪(べき乗)を計算します。
- [PARAM] other:
- 二項演算の右側の引数(対象)
- [RETURN]
- 計算結果
2 ** 3 # => 8 2 ** 0 # => 1 0 ** 0 # => 1
self ** other -> Integer | Float | Rational[permalink][rdoc] [redefined by rational]rpower(other) -> Integer | Float | Rational[redefined by rational]-
冪(べき)乗を計算します。other が負の整数の場合、計算結果を Rational オブジェクトで返します。
- [PARAM] other:
- 自身を other 乗する数
2.rpower(3) # => 8 2.rpower(-3) # => Rational(1, 8)