fix asinh() on win64 for big negative values

This commit is contained in:
Anatol Belski 2014-09-01 13:51:58 +02:00
parent 8a7d434025
commit 3aa5583cab

View file

@ -219,7 +219,16 @@ static double php_asinh(double z)
#ifdef HAVE_ASINH #ifdef HAVE_ASINH
return(asinh(z)); return(asinh(z));
#else #else
# ifdef _WIN64
if (z > 0) {
return log(z + sqrt(z * z + 1));
}
else {
return -log(-z + sqrt(z * z + 1));
}
# else
return(log(z + sqrt(1 + pow(z, 2))) / log(M_E)); return(log(z + sqrt(1 + pow(z, 2))) / log(M_E));
# endif
#endif #endif
} }
/* }}} */ /* }}} */