TIP: Click on subject to list as thread! ANSI
echo: science
to: MARK LEWIS
from: DAVID WILLIAMS
date: 2004-08-04 20:29:26
subject: Pythagorean triples

->  DW> Okay. Here's today's version. I discovered that Q1 
->  DW> and Q2 must be integers. Formerly, I thought they 
->  DW> could also be half-integers, so that their sum and 
->  DW> difference (D and E) would be integral. However, 
 
-> just remember that in my definition of Pythagorean Triples, they are whole 
-> numbers... not decimal fractions... i've not tried any of your code because  
-> don't know if it'll run on what i have available... also, i'd like to see it 
-> write to a text file instead of just to the screen... its been too long sinc 
-> looked at BASIC... almost 30 years or so ;) 
 
-> )\/(ark 
  
Yup. But my numbers Q1 and Q2 are NOT the lengths of the sides 
themselves. They are numbers that are used to calculate the sides, so 
that: 
  
E = Q1 + Q2 
D = Q2 - Q1 
  
A = (E^2 - D^2)/2 
B = E*D 
C = (E^2 + D^2)/2 
  
A, B and C are the actual lengths. 
  
It's easy to prove that E and D must be integers. But, at least in 
simple theory, Q1 and Q2 could have half-integral values. For example, 
if Q1 = 1.5 and Q2 = 3.5, E would be 5, and D would be 2. 
  
But now I see why this can't be true. E and D must *both* be odd 
numbers. 
  
                           dow 
--- Platinum Xpress/Win/WINServer v3.0pr5
* Origin: The Bayman BBS,Toronto, (416)698-6573 - 1:250/514 (1:250/514)
SEEN-BY: 633/267 270
@PATH: 250/514 123/500 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.