ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MathTrig.php
Go to the documentation of this file.
1<?php
2
4
9{
27 public static function ARABIC($roman)
28 {
29 return MathTrig\Arabic::evaluate($roman);
30 }
31
58 public static function ATAN2($xCoordinate = null, $yCoordinate = null)
59 {
60 return MathTrig\Trig\Tangent::atan2($xCoordinate, $yCoordinate);
61 }
62
82 public static function BASE($number, $radix, $minLength = null)
83 {
84 return MathTrig\Base::evaluate($number, $radix, $minLength);
85 }
86
108 public static function CEILING($number, $significance = null)
109 {
110 return MathTrig\Ceiling::ceiling($number, $significance);
111 }
112
132 public static function COMBIN($numObjs, $numInSet)
133 {
134 return MathTrig\Combinations::withoutRepetition($numObjs, $numInSet);
135 }
136
158 public static function EVEN($number)
159 {
160 return MathTrig\Round::even($number);
161 }
162
171 public static function getEven(float $number): int
172 {
173 return (int) MathTrig\Helpers::getEven($number);
174 }
175
194 public static function FACT($factVal)
195 {
196 return MathTrig\Factorial::fact($factVal);
197 }
198
216 public static function FACTDOUBLE($factVal)
217 {
218 return MathTrig\Factorial::factDouble($factVal);
219 }
220
239 public static function FLOOR($number, $significance = null)
240 {
241 return MathTrig\Floor::floor($number, $significance);
242 }
243
263 public static function FLOORMATH($number, $significance = null, $mode = 0)
264 {
265 return MathTrig\Floor::math($number, $significance, $mode);
266 }
267
286 public static function FLOORPRECISE($number, $significance = 1)
287 {
288 return MathTrig\Floor::precise($number, $significance);
289 }
290
308 public static function INT($number)
309 {
310 return MathTrig\IntClass::evaluate($number);
311 }
312
332 public static function GCD(...$args)
333 {
334 return MathTrig\Gcd::evaluate(...$args);
335 }
336
357 public static function LCM(...$args)
358 {
359 return MathTrig\Lcm::evaluate(...$args);
360 }
361
380 public static function logBase($number, $base = 10)
381 {
382 return MathTrig\Logarithms::withBase($number, $base);
383 }
384
402 public static function MDETERM($matrixValues)
403 {
404 return MathTrig\MatrixFunctions::determinant($matrixValues);
405 }
406
424 public static function MINVERSE($matrixValues)
425 {
426 return MathTrig\MatrixFunctions::inverse($matrixValues);
427 }
428
442 public static function MMULT($matrixData1, $matrixData2)
443 {
444 return MathTrig\MatrixFunctions::multiply($matrixData1, $matrixData2);
445 }
446
460 public static function MOD($a = 1, $b = 1)
461 {
462 return MathTrig\Operations::mod($a, $b);
463 }
464
480 public static function MROUND($number, $multiple)
481 {
482 return MathTrig\Round::multiple($number, $multiple);
483 }
484
499 public static function MULTINOMIAL(...$args)
500 {
501 return MathTrig\Factorial::multinomial(...$args);
502 }
503
518 public static function ODD($number)
519 {
520 return MathTrig\Round::odd($number);
521 }
522
538 public static function POWER($x = 0, $y = 2)
539 {
541 }
542
560 public static function PRODUCT(...$args)
561 {
562 return MathTrig\Operations::product(...$args);
563 }
564
584 public static function QUOTIENT($numerator, $denominator)
585 {
586 return MathTrig\Operations::quotient($numerator, $denominator);
587 }
588
602 public static function RAND($min = 0, $max = 0)
603 {
604 return MathTrig\Random::randBetween($min, $max);
605 }
606
622 public static function ROMAN($aValue, $style = 0)
623 {
624 return MathTrig\Roman::evaluate($aValue, $style);
625 }
626
642 public static function ROUNDUP($number, $digits)
643 {
644 return MathTrig\Round::up($number, $digits);
645 }
646
662 public static function ROUNDDOWN($number, $digits)
663 {
664 return MathTrig\Round::down($number, $digits);
665 }
666
684 public static function SERIESSUM($x, $n, $m, ...$args)
685 {
686 return MathTrig\SeriesSum::evaluate($x, $n, $m, ...$args);
687 }
688
704 public static function SIGN($number)
705 {
706 return MathTrig\Sign::evaluate($number);
707 }
708
717 public static function returnSign(float $number): int
718 {
719 return MathTrig\Helpers::returnSign($number);
720 }
721
736 public static function SQRTPI($number)
737 {
738 return MathTrig\Sqrt::pi($number);
739 }
740
762 public static function SUBTOTAL($functionType, ...$args)
763 {
764 return MathTrig\Subtotal::evaluate($functionType, ...$args);
765 }
766
784 public static function SUM(...$args)
785 {
786 return MathTrig\Sum::sumIgnoringStrings(...$args);
787 }
788
808 public static function SUMIF($range, $criteria, $sumRange = [])
809 {
810 return Statistical\Conditional::SUMIF($range, $criteria, $sumRange);
811 }
812
830 public static function SUMIFS(...$args)
831 {
832 return Statistical\Conditional::SUMIFS(...$args);
833 }
834
850 public static function SUMPRODUCT(...$args)
851 {
852 return MathTrig\Sum::product(...$args);
853 }
854
872 public static function SUMSQ(...$args)
873 {
874 return MathTrig\SumSquares::sumSquare(...$args);
875 }
876
890 public static function SUMX2MY2($matrixData1, $matrixData2)
891 {
892 return MathTrig\SumSquares::sumXSquaredMinusYSquared($matrixData1, $matrixData2);
893 }
894
908 public static function SUMX2PY2($matrixData1, $matrixData2)
909 {
910 return MathTrig\SumSquares::sumXSquaredPlusYSquared($matrixData1, $matrixData2);
911 }
912
926 public static function SUMXMY2($matrixData1, $matrixData2)
927 {
928 return MathTrig\SumSquares::sumXMinusYSquared($matrixData1, $matrixData2);
929 }
930
946 public static function TRUNC($value = 0, $digits = 0)
947 {
948 return MathTrig\Trunc::evaluate($value, $digits);
949 }
950
965 public static function SEC($angle)
966 {
968 }
969
984 public static function SECH($angle)
985 {
987 }
988
1003 public static function CSC($angle)
1004 {
1006 }
1007
1022 public static function CSCH($angle)
1023 {
1025 }
1026
1041 public static function COT($angle)
1042 {
1044 }
1045
1060 public static function COTH($angle)
1061 {
1063 }
1064
1079 public static function ACOT($number)
1080 {
1081 return MathTrig\Trig\Cotangent::acot($number);
1082 }
1083
1096 public static function numberOrNan($result)
1097 {
1099 }
1100
1115 public static function ACOTH($number)
1116 {
1117 return MathTrig\Trig\Cotangent::acoth($number);
1118 }
1119
1135 public static function builtinROUND($number, $precision)
1136 {
1137 return MathTrig\Round::round($number, $precision);
1138 }
1139
1154 public static function builtinABS($number)
1155 {
1156 return MathTrig\Absolute::evaluate($number);
1157 }
1158
1173 public static function builtinACOS($number)
1174 {
1175 return MathTrig\Trig\Cosine::acos($number);
1176 }
1177
1192 public static function builtinACOSH($number)
1193 {
1194 return MathTrig\Trig\Cosine::acosh($number);
1195 }
1196
1211 public static function builtinASIN($number)
1212 {
1213 return MathTrig\Trig\Sine::asin($number);
1214 }
1215
1230 public static function builtinASINH($number)
1231 {
1232 return MathTrig\Trig\Sine::asinh($number);
1233 }
1234
1249 public static function builtinATAN($number)
1250 {
1251 return MathTrig\Trig\Tangent::atan($number);
1252 }
1253
1268 public static function builtinATANH($number)
1269 {
1270 return MathTrig\Trig\Tangent::atanh($number);
1271 }
1272
1287 public static function builtinCOS($number)
1288 {
1289 return MathTrig\Trig\Cosine::cos($number);
1290 }
1291
1306 public static function builtinCOSH($number)
1307 {
1308 return MathTrig\Trig\Cosine::cosh($number);
1309 }
1310
1325 public static function builtinDEGREES($number)
1326 {
1327 return MathTrig\Angle::toDegrees($number);
1328 }
1329
1344 public static function builtinEXP($number)
1345 {
1346 return MathTrig\Exp::evaluate($number);
1347 }
1348
1363 public static function builtinLN($number)
1364 {
1365 return MathTrig\Logarithms::natural($number);
1366 }
1367
1382 public static function builtinLOG10($number)
1383 {
1384 return MathTrig\Logarithms::base10($number);
1385 }
1386
1401 public static function builtinRADIANS($number)
1402 {
1403 return MathTrig\Angle::toRadians($number);
1404 }
1405
1420 public static function builtinSIN($number)
1421 {
1422 return MathTrig\Trig\Sine::sin($number);
1423 }
1424
1439 public static function builtinSINH($number)
1440 {
1441 return MathTrig\Trig\Sine::sinh($number);
1442 }
1443
1458 public static function builtinSQRT($number)
1459 {
1460 return MathTrig\Sqrt::sqrt($number);
1461 }
1462
1477 public static function builtinTAN($number)
1478 {
1479 return MathTrig\Trig\Tangent::tan($number);
1480 }
1481
1496 public static function builtinTANH($number)
1497 {
1498 return MathTrig\Trig\Tangent::tanh($number);
1499 }
1500
1511 public static function nullFalseTrueToNumber(&$number): void
1512 {
1513 $number = Functions::flattenSingleValue($number);
1514 if ($number === null) {
1515 $number = 0;
1516 } elseif (is_bool($number)) {
1517 $number = (int) $number;
1518 }
1519 }
1520}
$result
$n
Definition: RandomTest.php:85
An exception for terminatinating execution or to throw for unit testing.
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
Definition: Functions.php:649
static evaluate($number, $radix, $minLength=null)
BASE.
Definition: Base.php:24
static ceiling($number, $significance=null)
CEILING.
Definition: Ceiling.php:26
static withoutRepetition($numObjs, $numInSet)
COMBIN.
static precise($number, $significance=1)
FLOOR.PRECISE.
Definition: Floor.php:87
static floor($number, $significance=null)
FLOOR.
Definition: Floor.php:31
static math($number, $significance=null, $mode=0)
FLOOR.MATH.
Definition: Floor.php:61
static numberOrNan($result)
Return NAN or value depending on argument.
Definition: Helpers.php:125
static withBase($number, $base=10)
LOG_BASE.
Definition: Logarithms.php:22
static quotient($numerator, $denominator)
QUOTIENT.
Definition: Operations.php:124
static randBetween($min, $max)
RANDBETWEEN.
Definition: Random.php:27
static evaluate($aValue, $style=0)
ROMAN.
Definition: Roman.php:821
static down($number, $digits)
ROUNDDOWN.
Definition: Round.php:72
static up($number, $digits)
ROUNDUP.
Definition: Round.php:42
static round($number, $precision)
ROUND.
Definition: Round.php:20
static multiple($number, $multiple)
MROUND.
Definition: Round.php:102
static evaluate($x, $n, $m,... $args)
SERIESSUM.
Definition: SeriesSum.php:22
static sumXMinusYSquared($matrixData1, $matrixData2)
SUMXMY2.
Definition: SumSquares.php:123
static sumXSquaredPlusYSquared($matrixData1, $matrixData2)
SUMX2PY2.
Definition: SumSquares.php:95
static sumXSquaredMinusYSquared($matrixData1, $matrixData2)
SUMX2MY2.
Definition: SumSquares.php:67
static product(... $args)
SUMPRODUCT.
Definition: Sum.php:85
static sumIgnoringStrings(... $args)
SUM, ignoring non-numeric non-error strings.
Definition: Sum.php:21
static atan2($xCoordinate, $yCoordinate)
ATAN2.
Definition: Tangent.php:112
static evaluate($value=0, $digits=0)
TRUNC.
Definition: Trunc.php:19
static SUMIF($range, $criteria, $sumRange=[])
SUMIF.
Definition: MathTrig.php:808
static FLOORMATH($number, $significance=null, $mode=0)
FLOOR.MATH.
Definition: MathTrig.php:263
static SERIESSUM($x, $n, $m,... $args)
SERIESSUM.
Definition: MathTrig.php:684
static FACTDOUBLE($factVal)
FACTDOUBLE.
Definition: MathTrig.php:216
static SUMX2MY2($matrixData1, $matrixData2)
SUMX2MY2.
Definition: MathTrig.php:890
static nullFalseTrueToNumber(&$number)
Many functions accept null/false/true argument treated as 0/0/1.
Definition: MathTrig.php:1511
static MDETERM($matrixValues)
MDETERM.
Definition: MathTrig.php:402
static numberOrNan($result)
Return NAN or value depending on argument.
Definition: MathTrig.php:1096
static COMBIN($numObjs, $numInSet)
COMBIN.
Definition: MathTrig.php:132
static SUMX2PY2($matrixData1, $matrixData2)
SUMX2PY2.
Definition: MathTrig.php:908
static CEILING($number, $significance=null)
CEILING.
Definition: MathTrig.php:108
static FLOOR($number, $significance=null)
FLOOR.
Definition: MathTrig.php:239
static BASE($number, $radix, $minLength=null)
BASE.
Definition: MathTrig.php:82
static SUBTOTAL($functionType,... $args)
SUBTOTAL.
Definition: MathTrig.php:762
static getEven(float $number)
Helper function for Even.
Definition: MathTrig.php:171
static logBase($number, $base=10)
LOG_BASE.
Definition: MathTrig.php:380
static RAND($min=0, $max=0)
RAND/RANDBETWEEN.
Definition: MathTrig.php:602
static ATAN2($xCoordinate=null, $yCoordinate=null)
ATAN2.
Definition: MathTrig.php:58
static builtinROUND($number, $precision)
ROUND.
Definition: MathTrig.php:1135
static ROMAN($aValue, $style=0)
ROMAN.
Definition: MathTrig.php:622
static MULTINOMIAL(... $args)
MULTINOMIAL.
Definition: MathTrig.php:499
static MMULT($matrixData1, $matrixData2)
MMULT.
Definition: MathTrig.php:442
static MROUND($number, $multiple)
MROUND.
Definition: MathTrig.php:480
static ROUNDUP($number, $digits)
ROUNDUP.
Definition: MathTrig.php:642
static TRUNC($value=0, $digits=0)
TRUNC.
Definition: MathTrig.php:946
static MINVERSE($matrixValues)
MINVERSE.
Definition: MathTrig.php:424
static FLOORPRECISE($number, $significance=1)
FLOOR.PRECISE.
Definition: MathTrig.php:286
static SUMXMY2($matrixData1, $matrixData2)
SUMXMY2.
Definition: MathTrig.php:926
static returnSign(float $number)
returnSign = returns 0/-1/+1.
Definition: MathTrig.php:717
static ROUNDDOWN($number, $digits)
ROUNDDOWN.
Definition: MathTrig.php:662
static SUMPRODUCT(... $args)
SUMPRODUCT.
Definition: MathTrig.php:850
static QUOTIENT($numerator, $denominator)
QUOTIENT.
Definition: MathTrig.php:584
static SUMIF($range, $condition, $sumRange=[])
SUMIF.
$x
Definition: complexTest.php:9
$y
Definition: example_007.php:83
$style
Definition: example_012.php:70
$angle
$base
Definition: index.php:4