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 CorLib Overview

Class BigIntegerStatic Overview