1 2 3 4 5 6 7 8 9 10 11 12 13
#include <math.h> static double powerseries(const double b, const double z, unsigned int n) { double temp = 0.0; for (unsigned int k = 0; k < n; ++k) { temp += pow(z, k) / (factorial(k) * pochhammer(b, k)); } return temp; }