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

python handles big int automatically:

sh-4.2$ python -c "print(-805387388120759743+804357581458175153+126021232973356313)" 42



Hn seems to have stripped the asterisks from your message.


nah, bigint is just another wall you may hit

bc/dc arbitrary precision calculators are usually installed by default on *nix platforms and they handle numbers with thousands of digits

$ time echo '12345^67890' |bc |wc -c

285941

real 0m2.137s

user 0m2.128s

sys 0m0.012s


Python's default number implementation has full support for arbitrarily large numbers, and will allocate more memory as needed to do so, making the original claim correct.




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

Search: