com php-src: fix asinh() on win64 for big negative values: ext/standard/math.c

From: Date: Mon, 01 Sep 2014 13:34:40 +0000
Subject: com php-src: fix asinh() on win64 for big negative values: ext/standard/math.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81325@lists.php.net to get a copy of this message
Commit: 3aa5583cab35f94dc6847c01b4e9838e1969faa9 Author: Anatol Belski <ab@php.net> Mon, 1 Sep 2014 13:51:58 +0200 Parents: 8a7d434025518d67d060f3d49aa28965c1871a8c Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3aa5583cab35f94dc6847c01b4e9838e1969faa9 Log: fix asinh() on win64 for big negative values Changed paths: M ext/standard/math.c Diff: diff --git a/ext/standard/math.c b/ext/standard/math.c index a1dda23..665822c 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 } /* }}} */

« previous php.cvs (#81325) next »