Clean up the divided_difference function.