From ea2679568fbaa8ed25d54a9199b5979d97c49960 Mon Sep 17 00:00:00 2001 From: fdai7848 Date: Sat, 3 Feb 2024 17:33:40 +0100 Subject: [PATCH] add function to get euler number --- src/reihen.c | 4 ++++ src/reihen.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/reihen.c b/src/reihen.c index 01fd0a5..b9f15e9 100644 --- a/src/reihen.c +++ b/src/reihen.c @@ -24,4 +24,8 @@ double exponential(double x){ sum += (1.0/fac(i)*(powerD(i,x))); } return sum; +} + +double euler(){ + return exponential(1); } \ No newline at end of file diff --git a/src/reihen.h b/src/reihen.h index bd4e520..20f8a18 100644 --- a/src/reihen.h +++ b/src/reihen.h @@ -2,5 +2,6 @@ #define REIHEN_H double exponential(double x); +double euler(); #endif // reihen.h \ No newline at end of file