Created by Ralphie Kabo, Telopea Park School yr 8 Maths class
To use the Pythagoras calculator, enter any two known digits from your Pythagorean problem into the fields at the top. For example, if your "C" value is unknown, and your "A" and "B" values are 5 and 12 respectively, enter 5 and 12 into the first two fields. Then press the "Calculate!" button. The calculator will output the missing "C" value, along with "A2", "B2" and "C2". To do a new sum, just press "New calculation".
Keep in mind that you always have to enter two values, and that you can just as easily set the calculator to figure out "B" or "A" than "C".
Also keep in mind the laws of Pythagoras: the "C" value is always the largest, as the hypotenuse is the longest side.
Just for interest, the formulas I used when building the calculator are:
|Computer language||Mathematical language|
|a2+b2=?2 (finding "C")||Math.sqrt(Math.pow(an,2)+Math.pow(bn,2))||√(no. in field A2 + number in field B2)|
|?2+b2=c2 (finding "A")||Math.sqrt(Math.pow(cn,2)-Math.pow(bn,2))||√(no. in field C2 - number in field B2)|
|a2+?2=c2 (finding "B")||Math.sqrt(Math.pow(cn,2)-Math.pow(an,2))||√(no. in field C2 - number in field A2)|
Then there is also some horrible maths to figure out the numbers in the bottom fields, but I won't bother explaining it.