New root-finding algorithm