32     public static function _add($left_operand, $right_operand, 
int $scale = 50)
    34         return static::getDefaultAdapter()->add($left_operand, $right_operand, $scale);
    43     public static function _div($left_operand, $right_operand, 
int $scale = 50)
    45         return static::getDefaultAdapter()->div($left_operand, $right_operand, $scale);
    53     public static function _mod($operand, $modulu): 
int    55         return static::getDefaultAdapter()->mod($operand, $modulu);
    63     public static function _mul($left_operand, $right_operand, 
int $scale = 50)
    65         return static::getDefaultAdapter()->mul($left_operand, $right_operand, $scale);
    73     public static function _pow($left_operand, $right_operand, 
int $scale = 50)
    75         return static::getDefaultAdapter()->pow($left_operand, $right_operand, $scale);
    82     public static function _sqrt($operand, 
int $scale = 50)
    84         return static::getDefaultAdapter()->sqrt($operand, $scale);
    92     public static function _sub($left_operand, $right_operand, 
int $scale = 50)
    94         return static::getDefaultAdapter()->sub($left_operand, $right_operand, $scale);
   103         $gcd = self::getGreatestCommonDivisor(abs($numerator), abs($denominator));
   116             return self::getGreatestCommonDivisor(
$b, 
$a % 
$b);
   124         static::$default_adapter = $adapter;
   129         if (null === static::$default_adapter) {
   130             static::$default_adapter = static::getFirstValidAdapter();
   133         return static::$default_adapter;
   141         if (null === $adapter) {
   142             return static::getFirstValidAdapter();
   145         $class_name = 
'ilMath' . $adapter . 
'Adapter';
   146         $path_to_class = realpath(
'Services/Math/classes/class.' . $class_name . 
'.php');
   148         if (!is_file($path_to_class) || !is_readable($path_to_class)) {
   150                 'The math adapter %s is not valid, please refer to a class implementing %s',
   155         if (!class_exists($class_name) || !is_subclass_of($class_name, ilMathAdapter::class)) {
   157                 'The math adapter class %s is not valid, please refer to a class implementing %s',
   163         return new $class_name();
   171         if (extension_loaded(
'bcmath')) {
   172             return static::getInstance(
'BCMath');
   175         return static::getInstance(
'Php');
   186         if (strpos($method, 
'_') === 0) {
   187             $method = substr($method, 1);
   190         $adapter = static::getDefaultAdapter();
   192         return call_user_func_array([$adapter, $method], $args);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _add($left_operand, $right_operand, int $scale=50)
 
static _div($left_operand, $right_operand, int $scale=50)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _mod($operand, $modulu)
 
static __callStatic(string $method, $args)
Backward compatibility: Map all static calls to an equivalent instance method of the adapter...
 
static _pow($left_operand, $right_operand, int $scale=50)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static isCoprimeFraction($numerator, $denominator)
 
static getFirstValidAdapter()
 
static _sub($left_operand, $right_operand, int $scale=50)
 
static getInstance(string $adapter=null)
 
static _sqrt($operand, int $scale=50)
 
static ilMathAdapter $default_adapter
 
static setDefaultAdapter(ilMathAdapter $adapter)
 
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples 
 
static getDefaultAdapter()
 
static getGreatestCommonDivisor($a, $b)
 
static _mul($left_operand, $right_operand, int $scale=50)