Sum of Two Squares
|
08-20-2019, 05:25 AM
Post: #4
|
|||
|
|||
RE: Sum of Two Squares
(08-17-2019 07:05 PM)klesl Wrote: Very interesting :-) Here is the Bezout program: this program returns the gcd of two integers a and b, and all of the possible integer solutions that fit a*x + b*y = d, with in a given range [-m, m]: Code: EXPORT BEZOUT(a,b,m) Output: { gcd, list of (x,y) pairs } Example: a = 18, b = 45, m = 20, find all solutions within the range [-20, 20]: BEZOUT(18, 45, 20): {9, {(-17, 7), (-12,5), (-7,3), (-2,1), (3,-1), (8,-3), (13,-5), (18,-7)}} |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Sum of Two Squares - Eddie W. Shore - 08-17-2019, 01:35 PM
RE: Sum of Two Squares - klesl - 08-17-2019, 07:05 PM
RE: Sum of Two Squares - Eddie W. Shore - 08-20-2019 05:25 AM
RE: Sum of Two Squares - Eddie W. Shore - 08-18-2019, 05:27 PM
RE: Sum of Two Squares - Albert Chan - 09-09-2021, 11:12 PM
RE: Sum of Two Squares - Albert Chan - 09-10-2021, 02:55 PM
RE: Sum of Two Squares - Albert Chan - 09-10-2021, 04:05 PM
|
User(s) browsing this thread: 1 Guest(s)