Check deriv

added return values to check_derivative and brets changes to fix Brent driver.