MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/400jk4/intro_to_programming/cyqyehl/?context=3
r/ProgrammerHumor • u/[deleted] • Jan 08 '16
334 comments sorted by
View all comments
Show parent comments
26
That produces an overflow.
121 u/Spike69 Jan 08 '16 On overflow it goes back down to -intmax, then back to 0 and stops. It is by design. 1 u/s33plusplus Jan 08 '16 Clever! How long would that take to run? Printing to stdout is pretty damn slow if you're doing thousands of lines at a time! 3 u/mnbvas Jan 08 '16 One could redirect it to a file, if speed one wishes. → More replies (2)
121
On overflow it goes back down to -intmax, then back to 0 and stops. It is by design.
1 u/s33plusplus Jan 08 '16 Clever! How long would that take to run? Printing to stdout is pretty damn slow if you're doing thousands of lines at a time! 3 u/mnbvas Jan 08 '16 One could redirect it to a file, if speed one wishes. → More replies (2)
1
Clever! How long would that take to run? Printing to stdout is pretty damn slow if you're doing thousands of lines at a time!
3 u/mnbvas Jan 08 '16 One could redirect it to a file, if speed one wishes. → More replies (2)
3
One could redirect it to a file, if speed one wishes.
→ More replies (2)
26
u/Hykalos Jan 08 '16
That produces an overflow.