Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > rationalライブラリ > Fixnumクラス > power!

instance method Fixnum#power!

power!(other) -> Integer | Float[permalink][rdoc] [added by rational]

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

[PARAM] other:
自身を other 乗する数

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