# Dealing with very large numbers

Question ID: 104442
 ▲ 8 ▼ ♥ 0 While not normally needed, how does one go about utilizing math functions with very large numbers, without getting an "overflow" error? Numbers treated as integers go from -2,147,483,648 to 2,147,483,647; yet, how could one utilize, say, 1e+15 or 3e+50? I’ve tried using CDbl and CLng, neither of which seem to work, at least not with carrying out functions which allow their use. For example, below wanting to convert a trillion to a base 2 number. An "overflow" results on the astrieck line regardless of using CDbl or CLng anywhere. Base = 2 Convert = 1000000000000 Function BaseNumber(Base,Convert) Dim i, j, x, y Dim aPlace() i = 0 j = 0 x = Convert While x>=0 i = i+1 x = Convert-Base^i Wend ReDim aPlace(i) ’ Converts to new base aPlace(j) = Convert While j=0 BaseNumber = BaseNumber & aPlace(y) y = y-1 Wend End Function Marked as spam Posted by viperboy1012 (Questions: 1, Answers: 0) Asked on January 10, 2012 10:03 am 5 views