Re: Integer overflow not reported [message #94496 is a reply to message #94494] |
Tue, 13 June 2017 10:17  |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
On Tuesday, June 13, 2017 at 10:58:25 AM UTC-4, Markus Schmassmann wrote:
> Hello,
>
> Why are integer overflows not reported, although according the
> documentation of CHECK_MATH [1] they should be detected?
The documentation on math errors says that integer overflow is not detected on all hardware.
I agree that nondetection of the overflow of long (32bit) integers is more insidious than nondetection of the overflow of short integers -- since we are now trained to always default to long integers. ---Wayne
http://www.harrisgeospatial.com/docs/Math_Errors.html
The detection of math errors, such as division by zero, overflow, and attempting to take the logarithm of a negative number, is hardware and operating system dependent. Some systems trap more errors than other systems. On systems that implement the IEEE floating-point standard, IDL substitutes the special floating-point values NaN and Infinity when it detects a floating point math error. (See Special Floating-Point Values.) Integer overflow and underflow is not detected. Integer divide by zero is detected on all platforms.
|
|
|