Date: Mon, 14 Nov 1994 21:41:37 -0500 (CDT) From: Aaron Ucko Subject: Re: Paranoia To: BILLM AT vaxc DOT cc DOT monash DOT edu DOT au Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Organization: Rockhurst College; Kansas City, MO >> 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. Really? It doesn't warn against them, and optimized TC++ got a perfect score. But I guess TC++ doesn't exactly "optimize." :-) > >> 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) ? Haven't tested it--but my point was that DJGPP should have configured the FPU to trap it, not trigger an exception. > >[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). Really? And why would that be? It comments on there being the 11 extra digits of precision, but wouldn't that, if anything, improve accuracy?? It certainly doesn't have a problem with the 40 extra bits in single-precision mode. --- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) -=- httyp! -=*=-Just because you're paranoid doesn't mean they aren't out to get you.-=*=- Geek code 2.1 [finger hayden AT vax1 DOT mankato DOT msus DOT edu for explanation]: GCS/M/S d(-) H s g+ p? !au a-- w+ v+ C++(+++)>++++ U-(S+)>++++ P+ L>++ 3(-) E-(----) !N>++ K- W(--) M-(--) V(--) po-(--) Y+(++) t(+) !5 j R G tv--(-) b+++ !D(--) B--(---) e>++++(*) u++(@) h!() f(+) r-(--)>+++ n+(-) y?