mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix asinh() on win64 for big negative values
This commit is contained in:
parent
8a7d434025
commit
3aa5583cab
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue