4 The following functions are equivalent to the function @code{gsl_pow_int}
5 (@pxref{Small integer powers}) with an error estimate. These functions are
6 declared in the header file @file{gsl_sf_pow_int.h}.
8 @deftypefun double gsl_sf_pow_int (double @var{x}, int @var{n})
9 @deftypefunx int gsl_sf_pow_int_e (double @var{x}, int @var{n}, gsl_sf_result * @var{result})
10 These routines compute the power @math{x^n} for integer @var{n}. The
11 power is computed using the minimum number of multiplications. For
12 example, @math{x^8} is computed as @math{((x^2)^2)^2}, requiring only 3
13 multiplications. For reasons of efficiency, these functions do not
14 check for overflow or underflow conditions.
18 #include <gsl/gsl_sf_pow_int.h>
20 double y = gsl_sf_pow_int(3.0, 12);