|
|
User login
Feeds |
Inf * 1.0 = PANIC
|
|||||
| Fri, 2004-12-17 01:21 | |
|
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 |
|
Forum posts: 364
Forum posts: 58
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).
www.fxuiq.com