Re: Exception on a simple arithmetic problem
Re: Exception on a simple arithmetic problem
- Subject: Re: Exception on a simple arithmetic problem
- From: Eric Albert <email@hidden>
- Date: Fri, 20 Jan 2006 10:03:15 -0800
On Jan 20, 2006, at 4:30 AM, Peter wrote:
This happen during debugging my C code under XCode, compiled for Intel
platform,
double fVal, fTemp;
fTemp = filesize; /* filesize is a long long and is
greater than 0 */
fVal = 100.0 / (double) fTemp; /* EXC_ARITHMETIC happens here */
The debugger stop and throws EXC_ARITHMETIC message at the calculation
line. When the program is in release mode(compile with -O2), this
problem never happens during runtime. I am using OS 10.4.3 (8F1111).
What condition makes EXC_ARITHMETIC exception to be thrown under
Pentium ?
Integer divide by zero is a fatal exception on Intel. You're doing a
floating point divide here, so the exception's probably happening on a
different line.
-Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden