From: Anatol Belski Date: Mon, 1 Sep 2014 13:33:40 +0000 (+0200) Subject: fix acosh for vs2012 and earlier X-Git-Tag: PRE_PHP7_REMOVALS~174 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4ed876db13db1bf0436b59c8f4f5d9298fd8b51;p=php fix acosh for vs2012 and earlier --- diff --git a/ext/standard/math.c b/ext/standard/math.c index 665822c035..c957ca4698 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 } /* }}} */