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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/21/02 18:47
Read: times


 
#31163 - RE: Division to 5 places
J Guy:
I did not say that at all. I am just pointing out the following things...

1) The umul16 routine I first suggested that Brian look at is a 16x16 multiply that produces a 32 bit result.

2) Brian has indicated that his data is 24 bits wide. That data is too wide to use a 16x16 multiply routine.

In response to your comment...
You make it sound as if a 2^16 multiply is more than padding a couple of zero bytes to the end.
I never even once implied any thing as such. What I did point out to you before was that if, as you said, "A reasonable" power of 2 scaler was used on converting a divisor to a multipler, that, for Brians example, the reasonable power of 2 has to be about 2^^16 so that he maintains the resolution he wants in the low digits. I also pointed out that if you are using a scaler as such (i.e. 1/25.4 * 2^^16 == 2580.157) as a multiplier, and the multiply routine you are using produces a 32-bit result then the data that is being scaled will work best if it is not over 16 bits.

I could also point out that using the muitiplier scheme like you first suggested also has a problem similar to the divide concept I talked about in the second of my long posts to this thread...Namely that the dropping of the 0.157 from the 2580.157 as the multiplier will introduce an error in the calculation.

Lastly, I did not search this site looking for a 32x32 multiply. If a sample like that exists then Brian may want to use it and thus avoid doing a divide at all. (But he still needs to do divides to convert to base 10 characters for display so having udiv32 in his code set could be helpful.
Mike Karas


List of 11 messages in thread
TopicAuthorDate
Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      
RE: Division to 5 places            01/01/70 00:00      

Back to Subject List