Question
Write a Python function compute_errors(true_val, approx_val) that returns:
- The absolute error
- The relative error (as a decimal)
Test it with:
- true = $\pi$ (use
math.pi), approx = 3.14 - true = $e$ (use
math.e), approx = 2.718
Print results formatted to 6 decimal places.