Square Root Process Similar to Long Division

09182021, 08:55 PM
(This post was last modified: 09182021 09:00 PM by jeejohn.)
Post: #6




RE: Square Root Process Similar to Long Division
I had never taken the time to "reverse engineer" the HP square root algorithm. I knew it had to be something similar to what I posted as it calculated square roots only a little bit slower than doing divisions.
I take it that dividing R by 2 in DEC is still fast? In HEX it would just be a bit shift. I see that this allows each subtraction step to be incremented by 1. Nice. Back in the days of the HP48 newsgroup, I had posted a challenge over redoing the HP48 ML multiplication in a different possibly faster way. It used one of the multipliers  say X and calculated 4X. Then using a bunch of GOTOs, if digit=1 > +X digit=2 > +X+X digit=3 > +4XX (instead of +X+X+X) digit=4 > +4X (instead of +X+X+X+X) etc. It was slightly faster, but not really worth the effort. All the tests and GOTOs steps added a lot of clock cycles. For division, something similar can be done and also an idea was to add a second loop to follow a negative remainder to "Add Up" to a positive remainder. Something similar could be done for the square root algorithm. When I did my manual square root calculations, I would keep a table of 2Xδ updated to grab quickly to add at the bottom and subtract to get the next remainder. Interesting how the processor capabilities affects which algorithm is used to calculate irrational functions. HP finding out about the Cordic algorithm galvanized HP into creating the HP9100 (the first desktop scientific calculator), which in turn, encourage Bill Hewlett to challenged his workers to create the HP35. John Edry 

« Next Oldest  Next Newest »

Messages In This Thread 
Square Root Process Similar to Long Division  jeejohn  09172021, 11:00 PM
RE: Square Root Process Similar to Long Division  Albert Chan  09172021, 11:58 PM
RE: Square Root Process Similar to Long Division  Albert Chan  09182021, 01:51 AM
RE: Square Root Process Similar to Long Division  Albert Chan  09182021, 12:46 PM
RE: Square Root Process Similar to Long Division  Albert Chan  09182021, 01:07 PM
RE: Square Root Process Similar to Long Division  jeejohn  09182021 08:55 PM

User(s) browsing this thread: 1 Guest(s)