From f4ed876db13db1bf0436b59c8f4f5d9298fd8b51 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 1 Sep 2014 15:33:40 +0200 Subject: [PATCH] fix acosh for vs2012 and earlier --- ext/standard/math.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 } /* }}} */ -- 2.50.1