The following example uses SQRT( ) to calculate the actual distance travelled uphill, given the base distance and elevation values. This example applies the Pythagorean theorem, which states that

. Using this theorem, the actual distance traveled is c, which means we want to calculate