Re: Fast Binary to BCD method on ARM9 with huge numbers?

From: Al Borowski (aj.borowski_at_erasethis.student.qut.edu.au)
Date: 03/09/04


Date: Wed, 10 Mar 2004 03:10:11 +1000

Thanks for the replies...

> For a simple improvement, instead of dividing my ten, divide by
> 1,000,000,000 repeatedly, and then process each remained down into
> nine decimal digits. About nine times faster, overall. Or use the
> largest power of ten you can comfortably divide by. With ARM you'll
> probably be doing the usually multiply-by-reciprocal-and-shift thing
> for the division.

I have no idea how this works - can you please give me some pointers?

My divide-by-ten uses the method at

http://courses.cs.vt.edu/~cs1104/Division/ShiftSubtract/Shift.Subtract.html

There is no floating point unit, so I don't understand how to multiply
by .1. I'd apreciate it if you colud help me out.

>If you've got an ARM with long multiplies, divide
> by one billion, without long multiplies, you're probably best off
> using 10,000. You can tweak this a little by dividing by the largest
> convenient power of five instead, and then shifting by enough extra
> bits to convert that back to a power of ten (you can do 13 digits at a
> time by dividing by 5**13 and 2**13 in each pass). And be sure to
> keep truncating your dividend as the high words zero out – that'll
> double throughput right there.
>

Thanks, you've given me many things to think about.

Al



Relevant Pages

  • Re: Questions on interfacing to current sense transformer
    ... The corrected mean square is the mean square minus the square of the ... There are methods that compute 1/sqrtthat don't divide inside the ... methods involving multiplies or divides on machines that don't ... The result is true power. ...
    (sci.electronics.design)
  • Re: What a bunch of fuckwits our former government was
    ... on with every left and right wing government shift of power. ... Every one who enters politics, no matter how righteous, ... They're masters at controlling the public through things like the media that constantly divide us. ...
    (alt.guitar)
  • Re: What a bunch of fuckwits our former government was
    ... on with every left and right wing government shift of power. ... Every one who enters politics, no matter how righteous, ... They're masters at controlling the public through things like the media that constantly divide us. ...
    (alt.guitar)
  • Re: Converting 7v DC to 7v AC at 50-60Hz
    ... How do i invert DC to AC? ... need a 50% duty cycle, or they don't work, at all. ... Divide by 1000 and yo have 60 Hz. ... Use a 78L05 voltage regulator to power the oscilator & divider, ...
    (sci.electronics.basics)
  • Re: multiply/divide algorithm
    ... yes there are algorithms to do multiply and divide. ... fixed-point multiplies. ... I'm sorry that responses to your post weren't all attempting to be helpful ...
    (comp.lang.verilog)

Loading