Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 2528

8-bit acorn software: other • Re: Basic's square root algorithm

$
0
0
I think the one from your initial post is functionally equivalent to the Newton implementation I posted. It just gets an extremely good initial guess by halving the exponent, which is already roughly equivalent to a square root, via floating point hacks (I haven't proven to myself that the DIV 2 + &40 thing actually halves the exponent for all inputs, but it's just a starting point so not overly important). Later on it divides by 2 by subtracting 1 from the exponent.

Statistics: Posted by Rich Talbot-Watkins — Sat Mar 01, 2025 9:56 am



Viewing all articles
Browse latest Browse all 2528

Trending Articles