WTF. If you're putting this on your reference sheet, it had better not have infinite loops in the first place. Also, remind me to give you my lecture about how to do non-buggy binary searches.