IBM Journal of Research and Development
IBM Skip to main content
  Home     Products & services     Support & downloads     My account  

  Select a country  
Journals Home  
  Systems Journal  
Journal of Research
and Development
    Current Issue  
    Recent Issues  
    Papers in Progress  
    Search/Index  
    Orders  
    Description  
    Patents  
    Recent publications  
    Author's Guide  
  Staff  
  Contact Us  
  Related links:  
     IBM Research  

IBM Journal of Research and Development  
Volume 27, Number 6, Page 577 (1983)
Nontopical Issue
  Full article: arrowPDF   arrowCopyright info





   

Replacing Square Roots by Pythagorean Sums

by C. Moler, D. Morrison
An algorithm is presented for computing a “Pythagorean sum” a ⊕ c + b = √(a2 + b2) directly from a and b without computing their squares or taking a square root. No destructive floating point overflows or underflows are possible. The algorithm can be extended to compute the Euclidean norm of a vector. The resulting subroutine is short, portable, robust, and accurate, but not as efficient as some other possibilities. The algorithm is particularly attractive for computers where space and reliability are more important than speed.
Related Subjects: Algorithms; Computational methods; Mathematics (applied)