Date: Tue, 15 Nov 1994 11:15:58 +1100 From: Bill Metzenthen Subject: Re: Paranoia To: UCKO AT VAX1 DOT ROCKHURST DOT EDU Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Aaron Ucko "ucko AT vax1 DOT rockhurst DOT edu" wrote: > As previously recommended, I tried running Paranoia with DJGPP (and a few > other DOS products...): > > DJGPP (no optimization, double precision): Certain basic operations > (multiplication, etc.) neither truncate nor round correctly [actually, this > occurs in _all_ the double-precision cases I could test]. Crashes with > untrapped floating point exception when calculating Z^i for small values of Z > and i. > The stuff about the truncation/rounding is the one area where, as I mentioned in my earlier message, 'paranoia' incorrectly reports that the floating point stuff is FLAWed (counts as one FLAW) > DJGPP (optimization): Gets _very_ confused. First thinks base is 4096 (!), > then 0. Dies because 1 - 1/2 - (base) >= 1/2. 'paranoia' should never be compiled with optimizations. > DJGPP(no opt., single prec): Crashes on computing Z^i. Whoops! It's a long time since I began running 'paranoia'. My memory is hazy, but I think that I may have had to use a replacement for the djgpp pow() function. What does the current djgpp pow() function do if called as pow(-1.0,-2.0) ? [stuff deleted] > > I have not yet tested with QC or QP, as I don't have them installed right > now. The general conclusion, though, seems to be that the 8087/287/387/486+ > does _not_ round correctly in double-precision mode. As I said, 'paranoia' incorrectly reports one FLAW. The 80x87 FPUs do correctly round/truncate (unless you are unfortunate enough to have a faulty chip ;-). You will probably get this incorrect FLAW reported with any modern 'C' compiler (i.e. one which supports long doubles) and an 80x86 machine (where the normal convention with 80x87 FPUs is to use the 53 bit precision type as a double, and the 64 bit precision type as a long double). --Bill