A basic implementation of the secant method for finding roots of a function