Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

i = 0

while True:

    i += 1
Also never repeats..



except for the forever part

ints(8-128) will either wrap around (repeating) or will overflow error in any language I've ever used


Python uses BigInts, so it will go until it runs out of RAM, I believe.


Imagine a computer lasting long enough to count to a number larger than what fits in 8GB of RAM...


Let's see...

The age of the universe in Planck time requires 200 bits to represent as an integer.

The number of Planck cubes in the universe can be represented with 611 bits.

1 KB can represent an integer as large as 2^8000 = 10^2408. 10^2408 Planck times is 10^2347 x (age of universe). The last of the stars will burn out in 10^73 Planck times from now.


Hey this is a math fight, no computer architecture allowed!


Yes, if I knew the mathematical notation for the same thing I’d have used that. Overflow is not the point..




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: