Return to Snippet

Revision: 62824
at March 14, 2013 23:17 by cryothic


Initial Code
function modulo(number, div)
	tmp = ""

	for i = 1 to len(number)
		tmp = tmp & mid(cStr(number), i, 1)
		r = cInt(tmp) mod div
		tmp = cStr(r)
	next 
	
	modulo = cInt(tmp)
end function

Initial URL


Initial Description
Use this function to calculate modulo on numbers that overflow doubles.
Where "number" is the value you want to devide, and "div" is the number you want to devide by.

Initial Title
Modulo on big numbers

Initial Tags


Initial Language
ASP