Replacing Square Roots by Pythagorean Sums

نویسندگان

  • Cleve B. Moler
  • Donald Morrison
چکیده

An algorithm is presented for computing a “Pythagorean sum” a 0 b = d m 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 eficient as some other possibilities. The algorithm is particularly attractive for computers where space and reliability are more important than speed.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Class of Numerical Methods for the Computation of Pythagorean Sums

Moler and Morrison have described an iterative algorithm for the computation of the Pythagorean sum (a' + b2)"' of two real numbers a and b. This algorithm is immune to unwarrantedfloating-point overjows, has a cubic rate of convergence, and is easily transportable. This paper, which shows that the algorithm is essentially Harley's method applied to the computation of square roots. provides a g...

متن کامل

Sums of Three Squares in Function Fields of Conics and Cassels–catalan Curves

We show that a function field in one variable of genus zero has pythagoras number two if and only if either the base field is hereditarily pythagorean and, in case the function field is nonreal, uniquely ordered, or −1 is a square in the base field. We generalize one implication to function fields of Cassels-Catalan curves.

متن کامل

On Error Sums for Square Roots of Positive Integers with Applications to Lucas and Pell Numbers

Several types of infinite series are considered, which are defined by a fixed real number α and the denominators and numerators of the convergents of α. In this paper we restrict α to the irrational square roots of positive integers. We express the corresponding error sums in terms of a finite number of convergents. It is shown that an error sum formed by convergents with even indices takes onl...

متن کامل

An Optimal Bound for Sum of Square Roots of Special Type of Integers∗

The sum of square roots of integers problem is to find the minimum nonzero difference between two sums of square roots of integers. Let r(n,k) denote the minimum nonzero positive value: |∑i=1 √ ai −∑i=1 √ bi|, where ai and bi are positive integers not larger than integer n. We prove by an explicit construction that r(n,k) = O(n−2k+ 3 2 ) for fixed k and any n. Our result implies that in order t...

متن کامل

On Comparing Sums of Square Roots of Small Integers

Let k and n be positive integers, n > k. Define r(n, k) to be the minimum positive value of | √ a1 + · · ·+ √ ak − √ b1 − · · · − √ bk| where a1, a2, · · · , ak, b1, b2, · · · , bk are positive integers no larger than n. It is an important problem in computational geometry to determine a good upper bound of − log r(n, k). In this paper we prove an upper bound of 2O(n/ logn), which is better tha...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • IBM Journal of Research and Development

دوره 27  شماره 

صفحات  -

تاریخ انتشار 1983