みどり
06-18-2007, 06:17 AM
Hello everyone, here's a little sub that causes overflow:
Sub zzzzz()
Dim a As Double, b As Double, c As Double
a = 51
b = 19
c = 52
Debug.Print (b ^ c) Mod a
End Sub
By the way, if I do not use Mod operator, it gives the result of b^c as 3.12742749190775E+66. So the problem is with the "Mod" one.
Does anyone know the solution? Thank you!! ^_^
Sub zzzzz()
Dim a As Double, b As Double, c As Double
a = 51
b = 19
c = 52
Debug.Print (b ^ c) Mod a
End Sub
By the way, if I do not use Mod operator, it gives the result of b^c as 3.12742749190775E+66. So the problem is with the "Mod" one.
Does anyone know the solution? Thank you!! ^_^