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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/12/02 11:41
Read: times


 
#24328 - RE: floating point optimization/Kunal
Hmmm...For a 17 bit value I guess you could treat it as a 24 bit value with 7 redundant bits :-) Otherwise you could use the carry bit or some other bit as the 17th bit. I cannot say offhand though which method would be better, but I am more familiar with the first one.

As for 24 bit addition/subtraction, it is the same as 16-bit...only with one register more :-) They have got good sample code for 16-bit arithmetic on this site. If you undertsand how they do it for 16 bit values, you can extend the technique for 32 bit, 64 bit etc etc values.

Multi-byte multiplication is also quite easy to get. It's the 16+ bit division that gets complicated. Although they have code for all the above on this site, I think you could optimize it for your application.

I have done a 32-bit by 16-bit division, but the code is so much optimized for the particular range of values required for that project, that it cannot be used for general purpose applications without major modification.

If you could give the sizes (and if possible the expected range of values) for all the variables required in your application, I might be able to help you devise a strategy to solve the problem.

kundi

List of 33 messages in thread
TopicAuthorDate
floating point optimization            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: thanks            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: Erik confused!!!!            01/01/70 00:00      
RE: C51 optimizing c cross compiler            01/01/70 00:00      
RE: C51 optimizing c cross compiler            01/01/70 00:00      
RE: C51 optimizing c cross compiler            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: floating point optimization/Kunal            01/01/70 00:00      
RE: floating point optimization/Kunal            01/01/70 00:00      
RE: floating point optimization/Kunal            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      
RE: Higher speed devices ?            01/01/70 00:00      
RE: C51 optimizing c cross compiler            01/01/70 00:00      
RE: C51 optimizing c cross compiler            01/01/70 00:00      
RE: floating point optimization            01/01/70 00:00      

Back to Subject List