5 ms·
python handles big int automatically: sh-4.2$ python -c "print(-805387388120759743+804357581458175153+126021232973356313)" 42
by leecarraher 7y ago
python handles big int automatically:
sh-4.2$ python -c "print(-805387388120759743+804357581458175153+126021232973356313)"
42
- emergie 7y agonah, 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
- HALtheWise 7y agoPython'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.
- skykooler 7y agoHn seems to have stripped the asterisks from your message.