Mail Archives: djgpp/1996/05/28/20:05:24
Hafiz Awang Pon (004277a AT news DOT acadiau DOT ca) writes:
> ok. here's my situation. i have a program which when
> ran can give a floating point exception error and
> sometimes not.I'm trying to find the bug right now,
> but how do you finf a bug that sometimes appear
> and sometimes not. I'm not expecting any detail
> information about this, since at this point i am not
> presenting any of my code. i'm just wondering
> if anyone else had similar problems in the past, and
> if they do, hpw do they fixed it.
Is everything exactly the same when it does and when it doesn't happen?
I.e. exactly the same input, no random numbers?
If so, you might have a pointer usage error that refers to uninitialised
memory. Or, you might be mallocking some ram and expecting it to be full
of zeros and it has random junk in it (use calloc).
Make a very short test program out of the one you're having trouble with,
by removing everything irrelevant, but which still exhibits the floating
point error, and post the source, please.
> ...gotta stop spending sleepless coffee induced
> nights :)
.... Same here, but with Coca-Cola.
--
.*. "Clouds are not spheres, mountains are not cones, coastlines are not
-() < circles, and bark is not smooth, nor does lightning travel in a
`*' straight line." ,------------------------------------------------
-- B. Mandelbrot | Paul Derbyshire (PGD) ao950 AT freenet DOT carleton DOT ca
- Raw text -