Calculation using the Pythagorean Theorem