logoalt Hacker News

clark_dentyesterday at 3:58 PM4 repliesview on HN

Could you humor a coding noob--how do you deal with utterly insane inputs like that?


Replies

Ekarostoday at 9:46 AM

At some point you can just refuse. Too many digits. Well time to quit with error.

matthewkayinyesterday at 4:22 PM

You first ask if you really need to.

show 1 reply
wwalexanderyesterday at 5:17 PM

Arbitrary precision arithmetic (GMP, BigInteger, etc). Numbers can take arbitrary amounts of memory, instead of just a single machine word.

doubled112yesterday at 4:20 PM

Crash and report an error.

show 1 reply