Difference in variance calculations between Excel/Gnumeric and Open/LibreOffice (#1959)
* Difference in variance calculations between Excel/Gnumeric and Open/LibreOffice * Simplify STDEV() function logic by remembering that STDEV() is simply the square root of VAR(), so we can simply use the VAR() calculaion rather than duplicating the basic logic... and also allow for the differences between Excel/Gnumeric and Open/LibreOffice
This commit is contained in:
parent
ec2531411d
commit
a34dd71cce
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
|
||||
class StandardDeviations extends VarianceBase
|
||||
class StandardDeviations
|
||||
{
|
||||
/**
|
||||
* STDEV.
|
||||
|
|
@ -21,34 +19,12 @@ class StandardDeviations extends VarianceBase
|
|||
*/
|
||||
public static function STDEV(...$args)
|
||||
{
|
||||
$aArgs = Functions::flattenArrayIndexed($args);
|
||||
|
||||
$aMean = Averages::average($aArgs);
|
||||
|
||||
if (!is_string($aMean)) {
|
||||
$returnValue = 0.0;
|
||||
$aCount = -1;
|
||||
|
||||
foreach ($aArgs as $k => $arg) {
|
||||
if (
|
||||
(is_bool($arg)) &&
|
||||
((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
|
||||
) {
|
||||
$arg = (int) $arg;
|
||||
}
|
||||
// Is it a numeric value?
|
||||
if ((is_numeric($arg)) && (!is_string($arg))) {
|
||||
$returnValue += ($arg - $aMean) ** 2;
|
||||
++$aCount;
|
||||
}
|
||||
$result = Variances::VAR(...$args);
|
||||
if (!is_numeric($result)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($aCount > 0) {
|
||||
return sqrt($returnValue / $aCount);
|
||||
}
|
||||
}
|
||||
|
||||
return Functions::DIV0();
|
||||
return sqrt((float) $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -65,32 +41,12 @@ class StandardDeviations extends VarianceBase
|
|||
*/
|
||||
public static function STDEVA(...$args)
|
||||
{
|
||||
$aArgs = Functions::flattenArrayIndexed($args);
|
||||
|
||||
$aMean = Averages::averageA($aArgs);
|
||||
|
||||
if (!is_string($aMean)) {
|
||||
$returnValue = 0.0;
|
||||
$aCount = -1;
|
||||
|
||||
foreach ($aArgs as $k => $arg) {
|
||||
if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {
|
||||
} else {
|
||||
// Is it a numeric value?
|
||||
if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {
|
||||
$arg = self::datatypeAdjustmentAllowStrings($arg);
|
||||
$returnValue += ($arg - $aMean) ** 2;
|
||||
++$aCount;
|
||||
}
|
||||
}
|
||||
$result = Variances::VARA(...$args);
|
||||
if (!is_numeric($result)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($aCount > 0) {
|
||||
return sqrt($returnValue / $aCount);
|
||||
}
|
||||
}
|
||||
|
||||
return Functions::DIV0();
|
||||
return sqrt((float) $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -107,34 +63,12 @@ class StandardDeviations extends VarianceBase
|
|||
*/
|
||||
public static function STDEVP(...$args)
|
||||
{
|
||||
$aArgs = Functions::flattenArrayIndexed($args);
|
||||
|
||||
$aMean = Averages::average($aArgs);
|
||||
|
||||
if (!is_string($aMean)) {
|
||||
$returnValue = 0.0;
|
||||
$aCount = 0;
|
||||
|
||||
foreach ($aArgs as $k => $arg) {
|
||||
if (
|
||||
(is_bool($arg)) &&
|
||||
((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
|
||||
) {
|
||||
$arg = (int) $arg;
|
||||
}
|
||||
// Is it a numeric value?
|
||||
if ((is_numeric($arg)) && (!is_string($arg))) {
|
||||
$returnValue += ($arg - $aMean) ** 2;
|
||||
++$aCount;
|
||||
}
|
||||
$result = Variances::VARP(...$args);
|
||||
if (!is_numeric($result)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($aCount > 0) {
|
||||
return sqrt($returnValue / $aCount);
|
||||
}
|
||||
}
|
||||
|
||||
return Functions::DIV0();
|
||||
return sqrt((float) $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -151,31 +85,11 @@ class StandardDeviations extends VarianceBase
|
|||
*/
|
||||
public static function STDEVPA(...$args)
|
||||
{
|
||||
$aArgs = Functions::flattenArrayIndexed($args);
|
||||
|
||||
$aMean = Averages::averageA($aArgs);
|
||||
|
||||
if (!is_string($aMean)) {
|
||||
$returnValue = 0.0;
|
||||
$aCount = 0;
|
||||
|
||||
foreach ($aArgs as $k => $arg) {
|
||||
if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {
|
||||
} else {
|
||||
// Is it a numeric value?
|
||||
if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {
|
||||
$arg = self::datatypeAdjustmentAllowStrings($arg);
|
||||
$returnValue += ($arg - $aMean) ** 2;
|
||||
++$aCount;
|
||||
}
|
||||
}
|
||||
$result = Variances::VARPA(...$args);
|
||||
if (!is_numeric($result)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ($aCount > 0) {
|
||||
return sqrt($returnValue / $aCount);
|
||||
}
|
||||
}
|
||||
|
||||
return Functions::DIV0();
|
||||
return sqrt((float) $result);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
|
||||
abstract class VarianceBase
|
||||
{
|
||||
protected static function datatypeAdjustmentAllowStrings($value)
|
||||
|
|
@ -17,7 +19,7 @@ abstract class VarianceBase
|
|||
|
||||
protected static function datatypeAdjustmentBooleans($value)
|
||||
{
|
||||
if (is_bool($value)) {
|
||||
if (is_bool($value) && (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE)) {
|
||||
return (int) $value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class Variances extends VarianceBase
|
|||
$aCount = 0;
|
||||
foreach ($aArgs as $arg) {
|
||||
$arg = self::datatypeAdjustmentBooleans($arg);
|
||||
|
||||
// Is it a numeric value?
|
||||
if ((is_numeric($arg)) && (!is_string($arg))) {
|
||||
$summerA += ($arg * $arg);
|
||||
|
|
@ -117,6 +118,7 @@ class Variances extends VarianceBase
|
|||
$aCount = 0;
|
||||
foreach ($aArgs as $arg) {
|
||||
$arg = self::datatypeAdjustmentBooleans($arg);
|
||||
|
||||
// Is it a numeric value?
|
||||
if ((is_numeric($arg)) && (!is_string($arg))) {
|
||||
$summerA += ($arg * $arg);
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class StDevATest extends TestCase
|
||||
{
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerSTDEVA
|
||||
*
|
||||
|
|
@ -23,4 +29,23 @@ class StDevATest extends TestCase
|
|||
{
|
||||
return require 'tests/data/Calculation/Statistical/STDEVA.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerOdsSTDEVA
|
||||
*
|
||||
* @param mixed $expectedResult
|
||||
* @param mixed $values
|
||||
*/
|
||||
public function testOdsSTDEVA($expectedResult, $values): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
|
||||
|
||||
$result = Statistical::STDEVA($values);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
|
||||
}
|
||||
|
||||
public function providerOdsSTDEVA()
|
||||
{
|
||||
return require 'tests/data/Calculation/Statistical/STDEVA_ODS.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class StDevPATest extends TestCase
|
||||
{
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerSTDEVPA
|
||||
*
|
||||
|
|
@ -23,4 +29,23 @@ class StDevPATest extends TestCase
|
|||
{
|
||||
return require 'tests/data/Calculation/Statistical/STDEVPA.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerOdsSTDEVPA
|
||||
*
|
||||
* @param mixed $expectedResult
|
||||
* @param mixed $values
|
||||
*/
|
||||
public function testOdsSTDEVPA($expectedResult, $values): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
|
||||
|
||||
$result = Statistical::STDEVPA($values);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
|
||||
}
|
||||
|
||||
public function providerOdsSTDEVPA()
|
||||
{
|
||||
return require 'tests/data/Calculation/Statistical/STDEVPA_ODS.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class StDevPTest extends TestCase
|
||||
{
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerSTDEVP
|
||||
*
|
||||
|
|
@ -23,4 +29,23 @@ class StDevPTest extends TestCase
|
|||
{
|
||||
return require 'tests/data/Calculation/Statistical/STDEVP.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerOdsSTDEVP
|
||||
*
|
||||
* @param mixed $expectedResult
|
||||
* @param mixed $values
|
||||
*/
|
||||
public function testOdsSTDEVP($expectedResult, $values): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
|
||||
|
||||
$result = Statistical::STDEVP($values);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
|
||||
}
|
||||
|
||||
public function providerOdsSTDEVP()
|
||||
{
|
||||
return require 'tests/data/Calculation/Statistical/STDEVP_ODS.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class StDevTest extends TestCase
|
||||
{
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerSTDEV
|
||||
*
|
||||
|
|
@ -23,4 +29,23 @@ class StDevTest extends TestCase
|
|||
{
|
||||
return require 'tests/data/Calculation/Statistical/STDEV.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerOdsSTDEV
|
||||
*
|
||||
* @param mixed $expectedResult
|
||||
* @param mixed $values
|
||||
*/
|
||||
public function testOdsSTDEV($expectedResult, $values): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
|
||||
|
||||
$result = Statistical::STDEV($values);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
|
||||
}
|
||||
|
||||
public function providerOdsSTDEV()
|
||||
{
|
||||
return require 'tests/data/Calculation/Statistical/STDEV_ODS.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class VarATest extends TestCase
|
||||
{
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerVARA
|
||||
*
|
||||
|
|
@ -23,4 +29,23 @@ class VarATest extends TestCase
|
|||
{
|
||||
return require 'tests/data/Calculation/Statistical/VARA.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerOdsVARA
|
||||
*
|
||||
* @param mixed $expectedResult
|
||||
* @param mixed $values
|
||||
*/
|
||||
public function testOdsVARA($expectedResult, $values): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
|
||||
|
||||
$result = Statistical::VARA($values);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
|
||||
}
|
||||
|
||||
public function providerOdsVARA()
|
||||
{
|
||||
return require 'tests/data/Calculation/Statistical/VARA_ODS.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class VarPATest extends TestCase
|
||||
{
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerVARPA
|
||||
*
|
||||
|
|
@ -23,4 +29,23 @@ class VarPATest extends TestCase
|
|||
{
|
||||
return require 'tests/data/Calculation/Statistical/VARPA.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerOdsVARPA
|
||||
*
|
||||
* @param mixed $expectedResult
|
||||
* @param mixed $values
|
||||
*/
|
||||
public function testOdsVARPA($expectedResult, $values): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
|
||||
|
||||
$result = Statistical::VARPA($values);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
|
||||
}
|
||||
|
||||
public function providerOdsVARPA()
|
||||
{
|
||||
return require 'tests/data/Calculation/Statistical/VARPA_ODS.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class VarPTest extends TestCase
|
||||
{
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerVARP
|
||||
*
|
||||
|
|
@ -23,4 +29,23 @@ class VarPTest extends TestCase
|
|||
{
|
||||
return require 'tests/data/Calculation/Statistical/VARP.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerOdsVARP
|
||||
*
|
||||
* @param mixed $expectedResult
|
||||
* @param mixed $values
|
||||
*/
|
||||
public function testOdsVARP($expectedResult, $values): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
|
||||
|
||||
$result = Statistical::VARP($values);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
|
||||
}
|
||||
|
||||
public function providerOdsVARP()
|
||||
{
|
||||
return require 'tests/data/Calculation/Statistical/VARP_ODS.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,17 @@
|
|||
|
||||
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class VarTest extends TestCase
|
||||
{
|
||||
protected function tearDown(): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerVAR
|
||||
*
|
||||
|
|
@ -23,4 +29,23 @@ class VarTest extends TestCase
|
|||
{
|
||||
return require 'tests/data/Calculation/Statistical/VAR.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider providerOdsVAR
|
||||
*
|
||||
* @param mixed $expectedResult
|
||||
* @param mixed $values
|
||||
*/
|
||||
public function testOdsVAR($expectedResult, $values): void
|
||||
{
|
||||
Functions::setCompatibilityMode(Functions::COMPATIBILITY_OPENOFFICE);
|
||||
|
||||
$result = Statistical::VARFunc($values);
|
||||
self::assertEqualsWithDelta($expectedResult, $result, 1E-12);
|
||||
}
|
||||
|
||||
public function providerOdsVAR()
|
||||
{
|
||||
return require 'tests/data/Calculation/Statistical/VAR_ODS.php';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,4 +42,8 @@ return [
|
|||
'#VALUE!',
|
||||
[1, '2', 3.4, true, 5, null, 6.7, 'STRING', ''],
|
||||
],
|
||||
[
|
||||
'#NUM!',
|
||||
[],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -50,4 +50,8 @@ return [
|
|||
'#VALUE!',
|
||||
[1, '2', 3.4, true, 5, null, 6.7, 'STRING', ''],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -21,4 +21,12 @@ return [
|
|||
0.5,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.666666666667,
|
||||
[true, false, 1],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -9,4 +9,12 @@ return [
|
|||
'#DIV/0!',
|
||||
['A', 'B', 'C'],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -9,4 +9,12 @@ return [
|
|||
'#DIV/0!',
|
||||
[],
|
||||
],
|
||||
[
|
||||
0.707106781187,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.577350269190,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
27.463915719843,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[],
|
||||
],
|
||||
[
|
||||
0.7071067811865476,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.577350269190,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
@ -9,4 +9,12 @@ return [
|
|||
'#DIV/0!',
|
||||
['A', 'B', 'C'],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.0,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -9,4 +9,12 @@ return [
|
|||
'#DIV/0!',
|
||||
[],
|
||||
],
|
||||
[
|
||||
0.5,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.471404520791,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
26.0545581424825,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[],
|
||||
],
|
||||
[
|
||||
0.5,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.471404520791,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
26.0545581424825,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
['A', 'B', 'C'],
|
||||
],
|
||||
[
|
||||
0.5,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.471404520791,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
27.463915719843,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
['A', 'B', 'C'],
|
||||
],
|
||||
[
|
||||
0.7071067811865476,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.577350269190,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
@ -5,4 +5,12 @@ return [
|
|||
754.266666666667,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,4 +5,12 @@ return [
|
|||
754.266666666667,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
0.5,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.333333333333,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
754.266666666667,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
0.5,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.333333333333,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
@ -5,4 +5,12 @@ return [
|
|||
678.84,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
'#DIV/0!',
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.0,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -5,4 +5,12 @@ return [
|
|||
678.84,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
0.25,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.222222222222,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
678.84,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
0.25,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.222222222222,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
678.84,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
0.25,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.222222222222,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
[
|
||||
754.266666666667,
|
||||
[1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299],
|
||||
],
|
||||
[
|
||||
0.5,
|
||||
[true, false],
|
||||
],
|
||||
[
|
||||
0.333333333333,
|
||||
[true, false, 1],
|
||||
],
|
||||
];
|
||||
Loading…
Reference in New Issue