Message-Id: <3.0.3.32.19980427104650.006936f8@ns.coba.net> Date: Mon, 27 Apr 1998 10:46:50 -0400 To: djgpp AT delorie DOT com From: Daniel Delorme Subject: SIGFPE Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk Thanks to all for your input but its seems I was starting with the wrong assumption: I thought sqrt or pow was causing SIGFPE Consider these two very simple functions: main() { int I; double D; for (I=1; I<20; I++) { D = ReturnDouble(I); printf(" %f\n", D); } } double ReturnDouble(int I) { printf("%d\n", I); return(I*2); } Put each function in a different file and compile them as a project (I use RHIDE) and you'll get SIGFPE except if you run the program from the RHIDE editor under win95. But if you do that, although it won't crash, the output will be wrong. If the two functions are in the same file, it runs fine. If printf is commented out, the program crashes at I==8 If printf isn't commented out, the program crashes at I==5 For now I've circumvented the problem by passing a pointer to a double to my function (instead of it returning a double) but I'd really like to know what this is all about.