[Solved] why < is much faster than !=?
When you call cycle with the input value 113383, the process eventually sets n to 827370449, and 3*827370449+1 is 2482111348, which is greater than the maximum signed int and is interpreted as -1812855948. So there’s your first negative number where there should be no negative number. If this process then eventually sets n to -2, … Read more