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

Re: A85: SQRT algorithms




Pseudo-code suare root algorithm:

TOLERANCE = 1.0E-9
GUESS = X / 2
DO
GUESS = (GUESS + X / GUESS) / 2
WHILE ABS(GUESS * GUESS - X) > TOLERANCE

When the WHILE statement fails to be true, GUESS will hold the square
root of X.

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

On Mon, 2 Mar 1998 11:11:22 +0200 (EET) Jarno Rajala
<jarraj@opal.tnkpub.utu.fi> writes:
>
>Someone mentioned square root algorithm... I'we been wondering what it 
>is
>for a long time, so if someone could tell me what the algorithm is, 
>I'd
>appreciate it. (It can't be too hard to write in Z80...)
>
>
>

_____________________________________________________________________
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: