mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-04 02:23:10 +00:00
Implemented math.h
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user