Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

BigDecimal#power

power(p1, p2 = v2)

power(n) power(n, prec)

Returns the value raised to the power of n.

Note that n must be an Integer.

Also available as the operator **.