Previous: utrco Up: ../plot79_u.html Next: utre3
REAL FUNCTION UTRE2 (A,B) C$ (Euclidean Norm of 2-Vector) C$ Return SQRT(A**2+B**2) without doing a square root, and C$ without destructive underflow or overflow. C$ C$ This routine is based on an algorithm presented by Cleve C$ Moler in 1979 and finally published and discussed in: C$ C$ Cleve Moler and Donald Morrison, "Replacing Square Roots by C$ Pythagorean Sums", IBM J. Research and Development, 27, C$ 577-581 (1983). C$ C$ Augustin A. Dubrulle, "A Class of Numerical Methods for the C$ Computation of Pythagorean Sums", IBM J. Research and C$ Development, 27, 582-589 (1983). C$ C$ This version incorporates Dubrulle's scaling for A,B near C$ the underflow limit to preserve accuracy. Necessary C$ machine constants are retrieved at run-time (only once) C$ from the Port Library Framework. C$ (01-DEC-83)