Skip to Main Content
Moler and Morrison have described an iterative algorithm for the computation of the Pythagorean sum (a2 + b2)½ of two real numbers a and b. This algorithm is immune to unwarranted floating-point overflows, has a cubic rate of convergence, and is easily transportable. This paper, which shows that the algorithm is essentially Halley's method applied to the computation of square roots, provides a generalization to any order of convergence. Formulas of orders 2 through 9 are illustrated with numerical examples. The generalization keeps the number of floating-point divisions constant and should be particularly useful for computation in high-precision floating-point arithmetic.
Note: The Institute of Electrical and Electronics Engineers, Incorporated is distributing this Article with permission of the International Business Machines Corporation (IBM) who is the exclusive owner. The recipient of this Article may not assign, sublicense, lease, rent or otherwise transfer, reproduce, prepare derivative works, publicly display or perform, or distribute the Article.