diff --git a/src/PhpSpreadsheet/Calculation/Functions.php b/src/PhpSpreadsheet/Calculation/Functions.php index c5ffef52..b5a5252a 100644 --- a/src/PhpSpreadsheet/Calculation/Functions.php +++ b/src/PhpSpreadsheet/Calculation/Functions.php @@ -673,32 +673,6 @@ class Functions } } -// -// There are a few mathematical functions that aren't available on all versions of PHP for all platforms -// These functions aren't available in Windows implementations of PHP prior to version 5.3.0 -// So we test if they do exist for this version of PHP/operating platform; and if not we create them -// -if (!function_exists('acosh')) { - function acosh($x) - { - return 2 * log(sqrt(($x + 1) / 2) + sqrt(($x - 1) / 2)); - } // function acosh() -} - -if (!function_exists('asinh')) { - function asinh($x) - { - return log($x + sqrt(1 + $x * $x)); - } // function asinh() -} - -if (!function_exists('atanh')) { - function atanh($x) - { - return (log(1 + $x) - log(1 - $x)) / 2; - } // function atanh() -} - // // Strangely, PHP doesn't have a mb_str_replace multibyte function // As we'll only ever use this function with UTF-8 characters, we can simply "hard-code" the character set