Efficient HopDoubling but has bugs in iteration stopping