Ejemplo n.º 1
0
 public function testMult()
 {
     parent::testMult();
     $this->given($a = $this->fromNative($this->randomNativeNumber()), $b = $this->fromNative($this->randomNativeNumber()))->when($c = $a->mult($b->toInteger()))->then->object($c)->isInstanceOf(Real::class);
 }
Ejemplo n.º 2
0
 public function testMult()
 {
     parent::testMult();
     $this->given($a = $this->fromNative($this->randomNativeNumber()), $b = $this->fromNative($this->randomNativeNumber()))->when($c = $a->mult($b->toInteger()))->then->object($c)->isInstanceOf(Decimal::class);
     $this->given($positiveInfinite = $this->fromNative($this->positiveInfiniteNativeNumber()), $number = $this->fromNative($this->randomNativeNumber()))->then->boolean($positiveInfinite->multInteger($number->toInteger())->equals($positiveInfinite))->isTrue()->boolean($positiveInfinite->multReal($number->toReal())->equals($positiveInfinite))->isTrue()->boolean($positiveInfinite->multDecimal($number->toDecimal())->equals($positiveInfinite))->isTrue();
 }