www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/28/20:05:24

Xref: news2.mv.net comp.os.msdos.djgpp:4309
From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: anyone ever experienced this?
Date: 28 May 1996 10:38:21 GMT
Organization: The National Capital FreeNet
Lines: 32
Sender: ao950 AT freenet5 DOT carleton DOT ca (Paul Derbyshire)
Message-ID: <4oel2t$5ld@freenet-news.carleton.ca>
References: <31a8cfa8 DOT 0 AT 131 DOT 162 DOT 2 DOT 91>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet5.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019