Avoided returning -1 for special case in Ridders