Implemented math.h

This commit is contained in:
2024-10-24 12:00:36 +02:00
parent f163659f0c
commit a797d4366a
13 changed files with 423 additions and 44 deletions
+16
View File
@@ -0,0 +1,16 @@
#include <math.h>
double sinh(double x) {
return (exp(x) - exp(-x)) / 2.0;
}
double cosh(double x) {
return (exp(x) + exp(-x)) / 2.0;
}
double tanh(double x) {
double ex = exp(x);
double emx = exp(-x);
return (ex - exp) / (ex + exp);
}