From 1a52e23f08aa8ad687dcb24d2fae68f80b044726 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Thu, 16 Feb 2017 11:15:22 +0900 Subject: [PATCH] Remove obsolete math polyfills --- src/PhpSpreadsheet/Calculation/Functions.php | 26 -------------------- 1 file changed, 26 deletions(-) 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