diff options
author | Andreas Müller <andreas.mueller@othello.ch> | 2021-12-28 11:58:31 +0100 |
---|---|---|
committer | Andreas Müller <andreas.mueller@othello.ch> | 2021-12-28 11:58:31 +0100 |
commit | f5561d1fd796049c571e5c10e512228840baef50 (patch) | |
tree | aad58398fce7c78a602f97ad214bc87784ea0bb1 /buch/chapters/020-exponential/uebungsaufgaben/2.c | |
parent | more exponential function stuff (diff) | |
download | SeminarSpezielleFunktionen-f5561d1fd796049c571e5c10e512228840baef50.tar.gz SeminarSpezielleFunktionen-f5561d1fd796049c571e5c10e512228840baef50.zip |
new problem added
Diffstat (limited to '')
-rw-r--r-- | buch/chapters/020-exponential/uebungsaufgaben/2.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/buch/chapters/020-exponential/uebungsaufgaben/2.c b/buch/chapters/020-exponential/uebungsaufgaben/2.c new file mode 100644 index 0000000..c5a9644 --- /dev/null +++ b/buch/chapters/020-exponential/uebungsaufgaben/2.c @@ -0,0 +1,22 @@ +/* + * 2.c -- solution to problem 2 + * + * (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule + */ +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <gsl/gsl_sf_lambert.h> + +int main(int argc, char *argv[]) { + double s = log(2); + printf("s = %f\n", s); + double t = gsl_sf_lambert_W0(s); + printf("t = %f\n", t); + double y = exp(t); + printf("y = %f\n", y); + double x = atan(y); + printf("x = %.18f\n", x); + printf("2 = %f\n", pow(tan(x),tan(x))); + return EXIT_SUCCESS; +} |