mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2025-02-06 01:39:24 +03:00
Remove savedPrecision from Calculation Engine
This commit is contained in:
parent
cd151ae2e4
commit
ba04463cc9
@ -208,12 +208,12 @@ class PHPExcel_Calculation
|
||||
public $cyclicFormulaCount = 1;
|
||||
|
||||
/**
|
||||
* Precision used for calculations
|
||||
* Epsilon Precision used for comparisons in calculations
|
||||
*
|
||||
* @var integer
|
||||
*
|
||||
*/
|
||||
private $savedPrecision = 14;
|
||||
private $delta = 0.0000000000001;
|
||||
|
||||
|
||||
/**
|
||||
@ -2070,12 +2070,7 @@ class PHPExcel_Calculation
|
||||
|
||||
private function __construct(PHPExcel $workbook = null)
|
||||
{
|
||||
$setPrecision = (PHP_INT_SIZE == 4) ? 14 : 16;
|
||||
$this->savedPrecision = ini_get('precision');
|
||||
if ($this->savedPrecision < $setPrecision) {
|
||||
ini_set('precision', $setPrecision);
|
||||
}
|
||||
$this->delta = 1 * pow(10, -$setPrecision);
|
||||
$this->delta = 1 * pow(10, 0 - ini_get('precision'));
|
||||
|
||||
if ($workbook !== null) {
|
||||
self::$workbookSets[$workbook->getID()] = $this;
|
||||
@ -2087,13 +2082,6 @@ class PHPExcel_Calculation
|
||||
}
|
||||
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
if ($this->savedPrecision != ini_get('precision')) {
|
||||
ini_set('precision', $this->savedPrecision);
|
||||
}
|
||||
}
|
||||
|
||||
private static function loadLocales()
|
||||
{
|
||||
$localeFileDirectory = PHPEXCEL_ROOT.'PHPExcel/locale/';
|
||||
|
Loading…
x
Reference in New Issue
Block a user