Optimised CanFindRoot to not allocate memory.