Monday, December 19, 2011

Numerical ysis number storage/pythagorean theorem question?

This is a question for my computer science/numerical ysis course in college. If you have a right triangle that has one side that is 1.2222222 and the other is 3344556600, what is the length of the hypotenuse? If you plug this into a calculator or MATLAB, you will get the answer to be 3344556600, but this is because the computer and a calculator run out of memory to store a number (due to having 64-bits in double precision). There is a way of simplifying the Pythagorean theorem (that's my best guess on this problem) similar to how the quadratic equation can be multiplied by its conjugate to find the value of one root of a quadratic in terms of another. Any thoughts? Thanks!

0 comments:

Post a Comment