X-pop3-spooler: POP3MAIL 2.1.0 b 3 961213 -bs- Delivered-To: pcg AT goof DOT com Date: Thu, 12 Mar 1998 19:17:23 +0200 (EET) From: Tuukka Toivonen X-Sender: tuukkat AT stekt21 To: Marc Lehmann cc: andrewc AT rosemail DOT rose DOT hp DOT com, beastium Subject: Re: paranoia & extra precision [was -fno-float-store in pgcc] In-Reply-To: <19980312074656.14562@cerebro.laendle> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: Marc Lehmann Status: RO X-Status: A Content-Length: 1750 Lines: 41 On Thu, 12 Mar 1998, Marc Lehmann wrote: >> What do you make of the following code. PGCC produces different >> results when optimizing then when not optimization. I was >> told it has to do with -fno-float-store, but pgcc doesn't appear Same goes to standard GCC... I was disappointed to found that it didn't regard -ffloat-store. (But don't trust my word; it was so a long time ago that better to check it yourself.) >the x86 chips are not really ieee compliant. that's not too serious, as I'll This seems to be general misbelief (I've heard it before...). The problem is not with Intel FPU. The problem is in C-compiler (or maybe in OS... but not in FPU). Usually, you want as much precision as possible. So usually it's just good that there's some extra precision. Is some cases, truly IEEE-compliant floating point system is needed. For these cases there's a state bit in FPU that tells it to use less precision. (Another good use for this bit is to speed up fdiv about 20 clocks; but that's another story). Generally code generated by the C compiler should use the higher precision. But there really should be a switch to use IEEE-style lesser precision floats (maybe (p)gcc has it, I don't know). Even better would be #pragma or something which would allow one to use IEEE-floats in some part of code and extra precision in another part. >Any questions left? Don't hesitate - Ask! This was not exactly a question, but I hope you don't mind ;) -- | Tuukka Toivonen [PGP public key | Homepage: http://www.ee.oulu.fi/~tuukkat/ available] | Try also finger -l tuukkat AT ee DOT oulu DOT fi | Studying information engineering at the University of Oulu +-----------------------------------------------------------