We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Curiously enough, when this code is executed an integer overflow occurs when temp is multiplied by 53, but the code still produces correct result since 2*3*5*7*11*13*17*19*23*29*31*37*41*43*47*53-2^64 is greater than 10^18. Funny things start to happen when N is greater or equal to 14142414403480493114, but this value is outside of the range of allowed inputs.
Leonardo's Prime Factors
You are viewing a single comment's thread. Return to all comments →
Curiously enough, when this code is executed an integer overflow occurs when temp is multiplied by 53, but the code still produces correct result since 2*3*5*7*11*13*17*19*23*29*31*37*41*43*47*53-2^64 is greater than 10^18. Funny things start to happen when N is greater or equal to 14142414403480493114, but this value is outside of the range of allowed inputs.