aboutsummaryrefslogtreecommitdiffstats
path: root/buch/papers/0f1/listings/potenzreihe.c
diff options
context:
space:
mode:
authorPatrik Müller <36931350+p1mueller@users.noreply.github.com>2022-07-25 10:07:38 +0200
committerGitHub <noreply@github.com>2022-07-25 10:07:38 +0200
commit65692efda98ddc227db40aa181ee20aee1696010 (patch)
tree9214ba6c07c0bd0281a0c043180bd419607643fc /buch/papers/0f1/listings/potenzreihe.c
parentAdd missing explanations, correct typos, mention sign change of LP earlier (diff)
parentfix brace-problem (diff)
downloadSeminarSpezielleFunktionen-65692efda98ddc227db40aa181ee20aee1696010.tar.gz
SeminarSpezielleFunktionen-65692efda98ddc227db40aa181ee20aee1696010.zip
Merge branch 'AndreasFMueller:master' into master
Diffstat (limited to 'buch/papers/0f1/listings/potenzreihe.c')
-rw-r--r--buch/papers/0f1/listings/potenzreihe.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/buch/papers/0f1/listings/potenzreihe.c b/buch/papers/0f1/listings/potenzreihe.c
new file mode 100644
index 0000000..bfaa0e3
--- /dev/null
+++ b/buch/papers/0f1/listings/potenzreihe.c
@@ -0,0 +1,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;
+} \ No newline at end of file