Re: floating point

darcy@usul.CS.Berkeley.EDU (Joseph D. Darcy)
24 Oct 1998 01:48:27 -0400

          From comp.compilers

Related articles
Re: inlining + optimization = nuisance bugs luddy@concmp.com (Luddy Harrison) (1998-09-29)
Re: floating point, was inlining + optimization = nuisance bugs chase@world.std.com (David Chase) (1998-10-04)
Re: floating point will@ccs.neu.edu (William D Clinger) (1998-10-05)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-10-07)
Re: floating point will@ccs.neu.edu (William D Clinger) (1998-10-10)
Re: floating point dmcq@fano.demon.co.uk (David McQuillan) (1998-10-13)
Re: floating point darcy@CS.Berkeley.EDU (Joseph D. Darcy) (1998-10-19)
Re: floating point darcy@usul.CS.Berkeley.EDU (1998-10-24)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-11-01)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-11-01)
Re: floating point darcy@usul.CS.Berkeley.EDU (1998-11-06)
Re: floating point darcy@CS.Berkeley.EDU (Joseph D. Darcy) (1998-11-06)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-11-07)
Re: floating point eggert@twinsun.com (1998-11-19)
[3 later articles]
| List of all articles for this month |
From: darcy@usul.CS.Berkeley.EDU (Joseph D. Darcy)
Newsgroups: comp.compilers
Date: 24 Oct 1998 01:48:27 -0400
Organization: University of California, Berkeley
References: 98-09-164 98-10-018 98-10-040 98-10-120
Keywords: arithmetic, comment

"Joseph D. Darcy" <darcy@CS.Berkeley.EDU> writes:


>[The C9X committee is currently wrangling about precision rules, and they're
>a stinker to write in a way that is both useful and consistent. In cases
>like a = 3. + (b = 1./17.); does the 1/17 in the expression get narrowed
>to b's width? -John]


In the drafts of C9X I'm familiar with, the compiler can use a variety
of expression evaluation polices. A C9X compiler can use "strict
evaluation" as in ANSI C or one of two variations of "widest
available" as in pre-ANSI C. While the programmer can query to see
what policy the compiler is using (via the FLT_EVAL_METHOD macro) the
programmer cannot specify what policy to use. Therefore, ensuring a
particular evaluation for a section of code can be very awkward,
requiring either casting each intermediate result or having a copy of
the code tailored for each policy the compiler could use. To me, this
lack of easy programmer control is a more fundamental problem than the
details of any particular evaluation policy.


-Joe Darcy
darcy@cs.berkeley.edu
[I believe that the problem is that different machines do FP arithmetic
differently, e.g., x86 promotes everything to 80 bits, IBM 360/70/90
does it in the precision of the operands. -John]


Post a followup to this message

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