Feature #12647 ยป Update-tanh-function-to-be-faster.patch
| math.c | ||
|---|---|---|
|
double
|
||
|
tanh(double x)
|
||
|
{
|
||
|
# if defined(HAVE_SINH) && defined(HAVE_COSH)
|
||
|
return sinh(x) / cosh(x);
|
||
|
# else
|
||
|
return (exp(2*x) - 1) / (exp(2*x) + 1);
|
||
|
# endif
|
||
|
}
|
||
|
#endif
|
||