Assignment 4 Relative_Error function and counting calls to f

Re: Assignment 4 Relative_Error function and counting calls to f

by Ramses van Zon -
Number of replies: 0
Good question. Functionally, these implementation options yield the same result , but the first one would (unexpectedly to the user) be twice as expensive, so option two is more efficient and preferred.
A third option which avoids the duplicated code of option two, is to create a function - internal to the module - that computes the relative difference from two values of x, which both relative_error and solve_fixed_point could call.