public function testDiv() { parent::testDiv(); $this->given($a = $this->fromNative($this->randomNativeNumber()), $b = $this->fromNative($this->randomNativeNumber()))->when($c = $a->div($b->toInteger()))->then->object($c)->isInstanceOf(Real::class); }
public function testDiv() { parent::testDiv(); $this->given($a = $this->fromNative($this->randomNativeNumber()), $b = $this->fromNative($this->randomNativeNumber()))->when($c = $a->div($b->toInteger()))->then->object($c)->isInstanceOf(Decimal::class); $this->given($positiveInfinite = $this->fromNative($this->positiveInfiniteNativeNumber()), $number = $this->fromNative($this->randomNativeNumber()))->then->boolean($positiveInfinite->divInteger($number->toInteger())->equals($positiveInfinite))->isTrue()->boolean($positiveInfinite->divReal($number->toReal())->equals($positiveInfinite))->isTrue()->boolean($positiveInfinite->divDecimal($number->toDecimal())->equals($positiveInfinite))->isTrue(); }