| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A common complaint about the standard C library is its lack of a function for calculating (small) integer powers. GSL provides a simple functions to fill this gap. For reasons of efficiency, these functions do not check for overflow or underflow conditions.
gsl_sf_pow_int_e.
#include <gsl/gsl_math.h> double y = gsl_pow_4 (3.141) /* compute 3.141**4 */ |