Inf * 1.0 = PANIC

Login to reply to this topic.
Fri, 2004-12-17 01:21
Joined: 2004-08-18
Forum posts: 58
Hi,

I was wondering if anyone has an insight on the following problem I am having:  If I do lets say log(0), I result in an INF floating point value.  If I then multiply that on something I get a KERN-EXEC Panic.

Has anyone experienced this with Symbian?  Or is this ARM?  In either case, can this be turned on or off?

Thanks in advance,

ASY


Mon, 2004-12-20 20:51
Joined: 2004-07-10
Forum posts: 364
Re: Inf * 1.0 = PANIC
Could you post the code
Tue, 2004-12-21 13:55
Joined: 2004-08-18
Forum posts: 58
Inf * 1.0 = PANIC
I've debugged this a bit and determined that my problem was not originating from this particular condition, but from something else:

double d = pow(10,666);   // create INF
double n = 1.0;
double m = fabs(n-d);  // Panic

This causes USER-EXEC Panic with Reason number 3.

3 - This panic is raised when User::Abort() is called and the thread has no exception handler for exceptions of type EExcAbort.

doing just:

double m = fabs(d); doesn't cause the panic.

in MSVC/Win32, if I do this, originally d is: 1.#INF, (n-d) however is: -1.#INF.

In my application, I am comparing two doubles to a certain degree of precision, so what I do is

"if(fabs(a-b) < 0.00001)" and that pretty much dies when b is INF (resulting from a previous floating point operation).

  • Login to reply to this topic.