Re: inlining + optimization = nuisance bugs

Bruce Dawson <comments@cygnus-software.com>
24 Sep 1998 02:23:42 -0400

          From comp.compilers

Related articles
[15 earlier articles]
Re: inlining + optimization = nuisance bugs cfc@world.std.com (Chris F Clark) (1998-09-19)
Re: inlining + optimization = nuisance bugs luddy@concmp.com (Luddy Harrison) (1998-09-22)
Re: inlining + optimization = nuisance bugs zalman@netcom.com (1998-09-22)
Re: inlining + optimization = nuisance bugs chase@world.std.com (David Chase) (1998-09-22)
Re: inlining + optimization = nuisance bugs christian.bau@isltd.insignia.com (1998-09-22)
Re: inlining + optimization = nuisance bugs andrewf@slhosiery.com.au (Andrew Fry) (1998-09-24)
Re: inlining + optimization = nuisance bugs comments@cygnus-software.com (Bruce Dawson) (1998-09-24)
Re: inlining + optimization = nuisance bugs Martin.Ward@SMLtd.Com (1998-09-26)
Re: inlining + optimization = nuisance bugs toon@moene.indiv.nluug.nl (Toon Moene) (1998-09-29)
Re: inlining + optimization = nuisance bugs wclodius@aol.com (1998-09-29)
Re: inlining + optimization = nuisance bugs ralph@inputplus.demon.co.uk (Ralph Corderoy) (1998-09-29)
Re: inlining + optimization = nuisance bugs luddy@concmp.com (Luddy Harrison) (1998-09-29)
Re: inlining + optimization = nuisance bugs tim@wagner.princeton.edu (1998-09-29)
[6 later articles]
| List of all articles for this month |
From: Bruce Dawson <comments@cygnus-software.com>
Newsgroups: comp.compilers
Date: 24 Sep 1998 02:23:42 -0400
Organization: Cygnus Software
References: 98-09-071 98-09-085 98-09-129
Keywords: arithmetic

Andrew Fry wrote:
>
> > However, you can have "too much" precision if you can't have it
> > universally.
>
> It seems that people have been upset when the compiler emitted code
> counter to whatever dirty tricks they were expecting.


Anybody genuinely interested in the fine details of what the IEEE
standard allows, why this causes problems, and why a general solution
that's substantially better is probably impossible, should take a look
at:


http://www.validgh.com/


Some of the curiousities I gleaned from there are:


1) While you can set the precision on the 80x87 FPU so that the
results of each operation are rounded to float, double or extended (in
the extended registers), this does not reduce the exponent range (so
it isn't quite equivalent to storing the answer to memory) and it can
cause 'double rounding' as the correct result is rounded to extended
and then double, giving a different result from rounding directly to
double.


I believe the 68881 family suffers from the second problem, but not
the first.


But that extra precision can be very useful...
--
Bruce Dawson, Cygnus Software Author of Fractal eXtreme for Win32
Write me at: comments@cygnus-software.com
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.