aboutsummaryrefslogtreecommitdiffstats
path: root/buch/papers/0f1/listings/potenzreihe.c
blob: bfaa0e3c10f0e6159509e37b9e16da02964e9d76 (plain)
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;
}