Errors in Python 2.7 -


when given following function:

n=0 a=1 while a>0:     n=n+1     print n     a=(1.0+2.0**(-n))-1.0 

python stop @ n=53 (meaning a=0, in case). how come happens? theoretically, should never stop. i'm assuming has python's aproximation errors, "explainable"?


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -