Esempio n. 1
0
 public function testDivide()
 {
     $l = '894659845843956495764685';
     $r = '4756936453645';
     $expected = '188074794473';
     $this->assertEquals($expected, Number::divide($l, $r));
 }
Esempio n. 2
0
 /**
  * Computes the average value for a list of numbers
  * @return string
  */
 public function average()
 {
     Number::setScale(static::NUMERIC_FUNCTIONS_SCALE);
     return Number::divide($this->sum(), \strval($this->count()));
 }