com php-src: fix acosh for vs2012 and earlier: ext/standard/math.c

From: Date: Mon, 01 Sep 2014 13:34:42 +0000
Subject: com php-src: fix acosh for vs2012 and earlier: ext/standard/math.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-81326@lists.php.net to get a copy of this message
Commit: f4ed876db13db1bf0436b59c8f4f5d9298fd8b51 Author: Anatol Belski <ab@php.net> Mon, 1 Sep 2014 15:33:40 +0200 Parents: 3aa5583cab35f94dc6847c01b4e9838e1969faa9 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f4ed876db13db1bf0436b59c8f4f5d9298fd8b51 Log: fix acosh for vs2012 and earlier Changed paths: M ext/standard/math.c Diff: diff --git a/ext/standard/math.c b/ext/standard/math.c index 665822c..c957ca4 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -240,7 +240,15 @@ static double php_acosh(double x) #ifdef HAVE_ACOSH return(acosh(x)); #else +# ifdef _WIN64 + if (x >= 1) { + return log(x + sqrt(x * x - 1)); + } else { + return (DBL_MAX+DBL_MAX)-(DBL_MAX+DBL_MAX); + } +# else return(log(x + sqrt(x * x - 1))); +# endif #endif } /* }}} */

« previous php.cvs (#81326) next »