BigIntegerStatic: DivRem

DivRem

Divides one BigInteger value by another, returning both the quotient and remainder.



 Public Function DivRem(
	  ByVal dividend As BigInteger,
	  ByVal divisor As BigInteger,
	  ByRef remainder As BigInteger ) As BigInteger

Parameters

dividend
[ByVal] BigInteger. The BigInteger value to be divided.
divisor
[ByVal] BigInteger. The BigInteger value to divide by.
remainder
[ByRef] BigInteger. A variable to place the remainder in to.

Return Values

BigInteger -  The quotient of the division.

Remarks

Values of Nothing will be treated as zero.

 Dim b As BigInteger
 Dim r As BigInteger
 Dim q As BigInteger
 Set b = BInt(100)
 Set q = BigInteger.DivRem(b, BInt(40), r)
 Debug.Print q.ToString ' 2
 Debug.Print r.ToString ' 20
 

See Also

Project VBCorLib Overview Class BigIntegerStatic Overview BigIntegerStatic Properties BigIntegerStatic Methods Divide Equals