diff options
author | Anatol Belski <ab@php.net> | 2014-09-01 15:33:40 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-09-01 15:34:42 +0200 |
commit | f4ed876db13db1bf0436b59c8f4f5d9298fd8b51 (patch) | |
tree | 11035aefb00149996b9ed3a5f59136dad492c9f7 | |
parent | 3aa5583cab35f94dc6847c01b4e9838e1969faa9 (diff) | |
download | php-git-f4ed876db13db1bf0436b59c8f4f5d9298fd8b51.tar.gz |
fix acosh for vs2012 and earlier
-rw-r--r-- | ext/standard/math.c | 8 |
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 } /* }}} */ |