Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/06/04 05:54
Read: times


 
#82576 - Storage type more than Unsigned long int
Dear all,

I have a very strange situation, one of my couligs have a pre written programe for a fuel dispensing unit which needs to be modified for the latest requirments of our client, it has a situation where a value more than unsigned long int is required.

Making use of two Unsigned long ints is not possible as the program is very big and the calculations are at various locations so its defficult to find all .

The operation is amount calculation: -

Volume to be dispenced = 500 L == 500,000 ml.
(Max 6 digit volume)
Rate/Liter = 99.99
(Max allowed rate of 4 digits)
Values are taken in integer form for ease of calculation i.e 99.99 is taken as 9999

Now the amount calculation becomes 500000 * 9999 = 499500000.
Also if the volume required is 99999 liters then it is taken as
999999L = 999999000ml

So the amount becomes 999999000 * 9999 = 9998990001000


Please guide us how this situation can be handled.

Thanks,
Sachin

List of 9 messages in thread
TopicAuthorDate
Storage type more than Unsigned long int            01/01/70 00:00      
   Back to Assembly            01/01/70 00:00      
      9998990001000 = 48bit            01/01/70 00:00      
   re-scale            01/01/70 00:00      
   What language?            01/01/70 00:00      
      What Language            01/01/70 00:00      
         Sounds like assembler.......            01/01/70 00:00      
         re-scale            01/01/70 00:00      
            a common case            01/01/70 00:00      

Back to Subject List