summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/math.c8
1 files changed, 8 insertions, 0 deletions
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
}
/* }}} */