Project

General

Profile

Feature #12647 ยป Update-tanh-function-to-be-faster.patch

qitar888 (Chia-sheng Chen), 08/02/2016 08:42 AM

View differences:

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
    (1-1/1)