Method: BigDecimal#**

Defined in:
bigdecimal.c

#**(other) ⇒ Object

Returns the BigDecimal value of self raised to power other:

b = BigDecimal('3.14')
b ** 2              # => 0.98596e1
b ** 2.0            # => 0.98596e1
b ** Rational(2, 1) # => 0.98596e1

Related: BigDecimal#power.



3238
3239
3240
3241
3242
# File 'bigdecimal.c', line 3238

static VALUE
BigDecimal_power_op(VALUE self, VALUE exp)
{
    return BigDecimal_power(1, &exp, self);
}