Catching integer overflow

N

Nick Keighley

Bartc said:
I don't know. Integer overflow doesn't seem serious enough to warrant
hardware support. [...]

You'd rather have wrong answers quickly?

Yes. Integer operations need to be fast. Overflow checking should be
optional, perhaps during development only.

But if there is a hardware trap (like divide by zero) that didn't slow
things down, then that's fine, provided the overflow was a genuine error. I
can see that being difficult to implement however, unless you also have
separate arithmetic instructions for signed and unsigned values.

http://en.wikipedia.org/wiki/Ariane_5_Flight_501
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top