kolibrios/programs/develop/ktcc/trunk/libc/math/tanh.c

8 lines
125 B
C
Raw Normal View History

#include <math.h>
double tanh (double x)
{
double ex = exp(x), exm = exp(-x);
return (ex - exm) / (ex + exm);
}