Home > Software engineering >  The solution to the multiplication overflow
The solution to the multiplication overflow

Time:11-01

Such as 1 df * 68 fd4212=C471DE9FAE

I as long as the last eight de9fae (71), could you tell me how to do besides and 0 XFFFFFFFF can also?

CodePudding user response:

Can be used: MOD method

& HC471DE9FAE mod & amp; HC400000000

CodePudding user response:

Thank you for your reply, if df was 1 three random Numbers?

CodePudding user response:

Consider using the Variant types to store data, but such sacrifice is speed,
In addition, you can consider using Currency data type instead of a Long, this is 8 bytes,
One thing to note, again big capacity data types will be somewhere to fit the data, so, want to specific issue concrete analysis,

CodePudding user response:

 
Option Explicit

Private Sub Command1_Click ()
Dim varOne As the Variant
Dim varTwo As the Variant
Dim varThree As the Variant
On the Error Resume Next
VarOne=& amp; H1DF
VarTwo=& amp; H68FD4212
VarThree=varOne * varTwo
End Sub

  • Related