An improved three-term derivative-free method for solving nonlinear equations