From: Anatol Belski Date: Mon, 1 Sep 2014 11:51:58 +0000 (+0200) Subject: fix asinh() on win64 for big negative values X-Git-Tag: PRE_PHP7_REMOVALS~175 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3aa5583cab35f94dc6847c01b4e9838e1969faa9;p=php fix asinh() on win64 for big negative values --- diff --git a/ext/standard/math.c b/ext/standard/math.c index a1dda23eda..665822c035 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -219,7 +219,16 @@ static double php_asinh(double z) #ifdef HAVE_ASINH return(asinh(z)); #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)); +# endif #endif } /* }}} */