Subject: Re: Divide instruction.

From: Phil Norman <[email-masked]>
Date: Wed, 25 Jun 1997 17:17:14 +0100 (BST)

On Wed, 25 Jun 1997, Alun Da Penguin Jones wrote:

> Phil Norman decreed:
> > It does about 1,000,000,000,000 (1<<40 to be exact) DIVs in about 
> > 1.41s on a StrongARM at 202MHz.
>  
> octave:10> (2**40 / 1.41) / 202e6
> ans = 3860.4
>  
> Pardon me for being skeptical, but how does it manage to do 3860.4 divisions
> in each clock cycle? I'd love to see a copy of the code.

Errrrr..... now that's a tricky one.  Now I see your maths, that's made 
me highly skeptical too.  I never tried that calculation out myself 
(aftereffects of the Maths 3 course in my physics degree).  It does seem 
rather persuading, so I therefore decree the ARM code wrapper I put 
around my DIV routine to test the speed to be terminally broken.  I will 
have a look at it and see what went wrong.  Very sorry for making such a 
ridiculous claim without testing it more thoroughly, but whatever went 
wrong, it's still fast.

I've just posted a copy of the posting I sent to c.s.a.programmer, so you 
can see a copy of the code ;-)

Incidentally the reason I wrote it was for the slider bar feature of an 
app I'm working on called Duet.  It's a music CD player - quite a nice 
one IMHO - for RuskOS.  If anyone's interested, it's on my web page (URL 
below).

Thanks,
Phil

-- 

=============================================
= Phil Norman  -  [email-masked] =
= http://newton.ex.ac.uk/general/ug/norman  =
=    Acorn fanatic and physics student      =
=============================================