mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-26 20:35:21 +01:00
Tests/BigInteger: add two more divide tests
This commit is contained in:
parent
f8d8ad24fd
commit
d0014cbb20
@ -106,6 +106,22 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase
|
||||
|
||||
$this->assertSame('95627922070', (string) $q);
|
||||
$this->assertSame('10688759725', (string) $r);
|
||||
|
||||
$x = $this->getInstance('3369993333393829974333376885877453834204643052817571560137951281152');
|
||||
$y = $this->getInstance('4294967296');
|
||||
|
||||
list($q, $r) = $x->divide($y);
|
||||
|
||||
$this->assertSame('784637716923335095479473677900958302012794430558004314112', (string) $q);
|
||||
$this->assertSame('0', (string) $r);
|
||||
|
||||
$x = $this->getInstance('3369993333393829974333376885877453834204643052817571560137951281153');
|
||||
$y = $this->getInstance('4294967296');
|
||||
|
||||
list($q, $r) = $x->divide($y);
|
||||
|
||||
$this->assertSame('784637716923335095479473677900958302012794430558004314112', (string) $q);
|
||||
$this->assertSame('1', (string) $r);
|
||||
}
|
||||
|
||||
public function testModPow()
|
||||
|
Loading…
Reference in New Issue
Block a user