36     protected function setUp(): void
    53         $differ = 
new Differ(
new UnifiedDiffOutputBuilder(
"\n--- Expected\n+++ Actual\n"));
    56         $this->assertTrue($actual == $expected, $differ->diff($actual, $expected));
    62     public function testAdd(
string $a, 
string $b, 
string $result, 
int $scale): void
    70     public function testSub(
string $a, 
string $b, 
string $result, 
int $scale): void
    78     public function testMul(
string $a, 
string $b, 
string $result, 
int $scale): void
    86     public function testDiv(
string $a, 
string $b, 
string $result, 
int $scale): void
    94     public function testSqrt(
string $a, 
string $result, ?
int $scale): void
   102     public function testPow(
string $a, 
string $b, 
string $result, ?
int $scale): void
   111     public function testMod(
string $a, 
string $b, 
string $result): void
   119     public function testEquals(
string $a, 
string $b, 
bool $result, ?
int $scale): void
   129         $this->
assertEqualNumbers($result, ilMath::_applyScale($this->evalMath->evaluate($formula), $scale));
   137         $this->expectException(ilMathDivisionByZeroException::class);
   139         $this->mathAdapter->div(1, 0);
   147         $this->expectException(ilMathDivisionByZeroException::class);
   149         $this->mathAdapter->mod(1, 0);
   158             [
'1', 
'2', 
'3', self::DEFAULT_SCALE]
   168             [
'1', 
'2', 
'-1', self::DEFAULT_SCALE]
   178             'Multiplication with integer operands' => [
'1', 
'2', 
'2', self::DEFAULT_SCALE],
   179             'Multiplication with empty string operand' => [
'1', 
'', 
'0', self::DEFAULT_SCALE],
   180             'Multiplication with decimal operands' => [
'1.5', 
'2.5', 
'3.75', self::DEFAULT_SCALE]
   190             'Division with integer operands' => [
'1', 
'2', 
'0.5', self::DEFAULT_SCALE],
   191             'Division with empty string operand' => [
'', 
'2', 
'0', self::DEFAULT_SCALE],
   192             'Division with decimal operands' => [
'3.75', 
'2.5', 
'1.5', self::DEFAULT_SCALE],
   212             [
'9', 
'3', self::DEFAULT_SCALE],
   213             [
'4294967296', 
'65536', self::DEFAULT_SCALE],
   214             [
'12345678901234567890', 
'3513641828', null],
   215             [
'12345678901234567890', 
'3513641828.82', 2]
   225             [
'3', 
'2', 
'9', self::DEFAULT_SCALE]
   235             [
'3', 
'3', 
true, null],
   236             [
'27.424', 
'27.424', 
true, 5]
   246             [
'3+5', 
'8', self::DEFAULT_SCALE],
   247             [
'-3+5', 
'2', self::DEFAULT_SCALE],
   248             [
'3*6+5', 
'23', self::DEFAULT_SCALE],
   249             [
'10/2', 
'5', self::DEFAULT_SCALE],
   250             [
'13/60', 
'0.2166666666666', 13],
   251             [
'(-(-8)-sqrt((-8)^2-4*(7)))/(2)', 
'1', self::DEFAULT_SCALE],
   252             [
'(-(-8)+sqrt((-8)^2-4*(7)))/(2)', 
'7', self::DEFAULT_SCALE],
   253             [
'(-(-41)-sqrt((-41)^2-4*(1)*(5)))/(2*(1))', 
'0.122', 3],
   254             [
'(-(-41)+sqrt((-41)^2-4*(1)*(5)))/(2*(1))', 
'40.877', 3],
   255             [
'4^2-2*4+0.5*-16', 
'0', self::DEFAULT_SCALE],
   256             [
'-2^2-2*-2+0.5*-16', 
'-8', self::DEFAULT_SCALE]
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
testPow(string $a, string $b, string $result, ?int $scale)
powData 
 
testMod(string $a, string $b, string $result)
modData 
 
testSub(string $a, string $b, string $result, int $scale)
subData 
 
testCalculation(string $formula, string $result, int $scale)
calcData 
 
testDiv(string $a, string $b, string $result, int $scale)
divData 
 
testSqrt(string $a, string $result, ?int $scale)
sqrtData 
 
assertEqualNumbers(string $actual, string $expected)
This method is used as a 'Comparator' for two numeric strings and is equal to the ScalarComparator be...
 
testEquals(string $a, string $b, bool $result, ?int $scale)
equalsData 
 
testAdd(string $a, string $b, string $result, int $scale)
addData 
 
ilMathAdapter $mathAdapter
 
static setDefaultAdapter(ilMathAdapter $adapter)
 
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples 
 
testMul(string $a, string $b, string $result, int $scale)
mulData