37     public function add($left_operand, $right_operand, 
int $scale = null)
    45     public function sub($left_operand, $right_operand, 
int $scale = null)
    53     public function mul($left_operand, $right_operand, 
int $scale = null)
    61     public function div($left_operand, $right_operand, 
int $scale = null)
    63         if ($right_operand == 0) {
    73     public function mod($left_operand, $right_operand)
    75         if ($right_operand == 0) {
    85     public function pow($left_operand, $right_operand, 
int $scale = null)
    87         $left_operand = $this->
normalize($left_operand);
    88         $right_operand = $this->
normalize($right_operand);
    94         $left_operand_dec = $this->
exp2dec($left_operand);
    95         $right_operand_dec = $this->
exp2dec($right_operand);
    98         if (strpos($right_operand_dec, 
'.') === 
false) {
    99             return bcpow($left_operand_dec, $right_operand_dec, $scale);
   102         return $this->
applyScale($left_operand ** $right_operand, $scale);
   108     public function sqrt($operand, 
int $scale = null)
   110         return bcsqrt($operand, $scale);
   116     public function comp($left_operand, $right_operand, 
int $scale = null): 
int   118         return bccomp($left_operand, $right_operand, $scale);
 comp($left_operand, $right_operand, int $scale=null)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
__construct($scale=0)
ilMathBcMathAdapter constructor. 
 
normalize($number)
This function fixes problems which occur when locale ist set to de_DE for example, because bc* function expecting strings. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
mul($left_operand, $right_operand, int $scale=null)
 
mod($left_operand, $right_operand)
 
sqrt($operand, int $scale=null)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
applyScale($left_operand, int $scale=null)
 
sub($left_operand, $right_operand, int $scale=null)
 
div($left_operand, $right_operand, int $scale=null)
 
add($left_operand, $right_operand, int $scale=null)
 
pow($left_operand, $right_operand, int $scale=null)