Re: [math-fun] Origin of SQRT hack?
Henry Baker <hbaker1@pipeline.com> writes:
There's also a cool IBM trick to computing abs(z), where z=x+iy, which converges cubically (?). It works by rotating the vector onto the in steps, while preserving the length of the vector. There is a paper in one of the IBM journals from the 1980's. With the multiplicity of fp units in today's processors, it should work pretty well.
That's Cleve Moler & Donald Morrison, "Replacing Square Roots by Pythagorean Sums", IBM J Res Develop v27#6 Nov 1983, pp 577-581, reproduced here: http://www.scribd.com/doc/29568822/Moler-Morrison-Pythagorean-Sums It worked pretty well on old enough hardware, but it mostly can't keep up on modern machines with built-in sqrt (last I checked, which wasn't recently.) -- Tom Duff. Those idiots! They got it all wrong!
participants (1)
-
Tom Duff