But this call the division routine twice, what is not very efficient.
Is there any method to have the remainder of a division without doing the division again?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all.
I'm doing something like this:
division = a/b
remainder = a%b
But this call the division routine twice, what is not very efficient.
Is there any method to have the remainder of a division without doing the division again?
Thanks.
Hi,
In Help forum : _ http://sourceforge.net/projects/gcbasic/forums/forum/579126/topic/1827101?message=4526599_
W_Cholmondeley writes :
"SysCalcTempX stores the remainder after a division, and using it saves some calculations.)"
Thanks gcha44, that works ok, but i had to do:
dim volt0 as integer
dim division as integer
dim remainder as integer
division = volt0/100: remainder = SysCalcTempX : remainder_h = SysCalcTempX_h
if i do this:
division = volt0/100: remainder = SysCalcTempX
i have the high byte cleared