


Power Function
==============

.. index:: power function

.. function:: gsl_sf_pow_int(x, n)

 This routine computes the power :math:`x^n` for integer :math:`n`. The power is
 computed using the minimum number of multiplications. For example,
 :math:`x^8` is computed as :math:`((x^2)^2)^2`, requiring only 3 multiplications.
 For reasons of efficiency, these functions do not check for overflow
 or underflow conditions.

 .. code-block:: none

   include gsl.ampl;
   # compute and print 3**12
   print gsl_sf_pow_int(3, 12);
