4 ms·
"Any finite representation of numbers is going to have to break the familiar mathematical rules somehow;" How is that? The only numbers you would have trouble
by betterunix 13y ago
"Any finite representation of numbers is going to have to break the familiar mathematical rules somehow;"
How is that? The only numbers you would have trouble with are non-computable numbers, and I doubt you will find many software systems that deal with those. The only limiting factor should be the memory that is available, but that is beyond the scope of software; the software should work up to the limits of available memory, and increase the amount of memory should increase the range of numbers the program can deal with.
"I'm pretty satisfied with the tradeoffs made in our current integer representations"
I'm not, because (a) the semantics are counter-intuitive and (b) not a day goes by without people finding bugs related to integer overflows or weird, unexpected behavior. We have security problems. We have reliability problems. Voting machines get hacked and report negative vote totals.
At the very least, integer overflows should trigger an exception unless the programmer explicitly requests arithmetic modulo 2^32 (or 2^64, or 2^29, or whatever weird bit width the hardware supports).