11-23-2022, 07:55 PM
That's why I suggested to @Chris to run the code he has if possible. Maybe put in "PRINT" statements to figure out what values are assigned to which variables. If this is too hard, run the code in QB64 IDE and put variable watch breakpoints. I don't know how to do that since I use the IDE only for code formatting and to execute very simple programs.
At first assume all variables are type _INTEGER64. If the "final" result is zero then at least one of the variables has to be assigned something useful. He has to test to make sure there are no negative integers involved, then in which case the positive range of _INTEGER64 could be doubled to _UNSIGNED _INTEGER64.
However, if he requires fractional parts anywhere in the computations then this explanation has to be thrown out the window. There's a lot of "INT" and "MOD" usage so we could almost assume only large integers are being involved. Assume because Chris is not telling us if he ever tried to run his code and how.
At first assume all variables are type _INTEGER64. If the "final" result is zero then at least one of the variables has to be assigned something useful. He has to test to make sure there are no negative integers involved, then in which case the positive range of _INTEGER64 could be doubled to _UNSIGNED _INTEGER64.
However, if he requires fractional parts anywhere in the computations then this explanation has to be thrown out the window. There's a lot of "INT" and "MOD" usage so we could almost assume only large integers are being involved. Assume because Chris is not telling us if he ever tried to run his code and how.