[Prev][Next][Index][Thread]

Re: A85: More questions




i'm working in writing the assembler code for this. i basically have it
done, all i need is some documentation on using 32 bit numbers and
decimals.  if anyone has this i would appreciate it.

Keith Batten

Erik L Gillespie wrote:
> (You want to take the square root of X)
> 
> GUESS = X / 2
> DO
> GUESS = (GUESS + X / GUESS) / 2
> WHILE ABS(GUESS * GUESS - X) > 1.0E-9
> 
> A few things to remember here are to remember order of operations,
> anything divided by two can have a bitwise shift to the right for the
> same value (not decimals), and the 1.0E-9 is how many places
> approximation behind the decimal the solution will be (sp?).
> 
> If anyone ever decides to make the assembly routine for a square root
> function, I'd like to have it (source code).
> 
> Mordant
> egillespie@juno.com
> erik_gillespie_1096@gwgate.kvcc.edu
> 
> "Just because you're paranoid don't mean they're not after you." -Kurt
> Cobain
> 
> _____________________________________________________________________
> You don't need to buy Internet access to use free Internet e-mail.
> Get completely free e-mail from Juno at http://www.juno.com
> Or call Juno at (800) 654-JUNO [654-5866]


References: