Routine Name: LowerTriangleMatrix
Author: David Merkley
Language: Python
Description/Purpose: Calculates the relative error of approximating x with xapprox
Input: A number x and xapprox
Output: The relative error
Implementation/Code:
def relerr(xexact, xapprox):
output = abs(xexact - xapprox) / abs(xexact)
return output