From 6015358979707763815
X-Google-Thread: f78e5,eb811809d4f61b12
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII
Path: g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: kanze.james@neuf.fr (James Kanze)
Newsgroups: comp.std.c++
Subject: Re: Using extended precision in floating point
Date: Sun, 21 May 2006 07:33:50 GMT
Organization: Aioe.org NNTP Server
Lines: 44
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <e4nmt4$7ce$1@emma.aioe.org>
References: <1147882581.972497.100340@u72g2000cwu.googlegroups.com>   <pxbwtcjbv8l.fsf@news.bourguet.org>   <1148033537.225653.254200@j55g2000cwa.googlegroups.com> <1148043502.821551.249470@y43g2000cwc.googlegroups.com>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: news.demon.co.uk 1148196856 25535 158.152.254.254 (21 May 2006 07:34:16 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Sun, 21 May 2006 07:34:16 +0000 (UTC)
X-Original-To: std-c++@mailman.ucar.edu
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Thunderbird 1.5.0.2 (X11/20060420)
X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.cs.mu.OZ.AU id k4L7Y2tF020144
X-Greylisting: NO DELAY (Relay+Sender autoqualified);
	processed by UCSD_GL-v2.1 on mailbox7.ucsd.edu;
	Sat, 20 May 2006 11:27:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Path: comp-std-cpp-robomod!not-for-mail
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id k4L7Xo1l020078;
	Sun, 21 May 2006 17:33:50 +1000 (EST)
X-Delivered-To: std-c++@ucar.edu
X-Spamscanner: mailbox7.ucsd.edu  (v1.6 Aug  4 2005 15:27:38, -2.8/5.0 3.0.4)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
X-MailScanner: PASSED (v1.2.8 93992 k4KIR91d099223 mailbox7.ucsd.edu)
Xref: g2news2.google.com comp.std.c++:2073

wade@stoner.com wrote:
 > kanze wrote:

 >> From what I understand, adding the [g++] option -ffloat-store
 >> should cause conformant behavior.

 >> ... I think that the intent [of the standard] is that even
 >> when extended precision is used in sub-expressions, the
 >> programmer can force normal precision by means of a cast or
 >> an assignment.  The standard can certainly be interpreted
 >> this way, but I'm not sure that other interpretations are not
 >> possible.

 > I think that the documented behavior of -ffloat-store matches
 > this "intent."  However, the g++ emails suggest that on x86,
 > -ffloat-store applies to named variables, but not to
 > temporaries.  This would suggest that a cast may not force
 > normal precision (unless the result of the cast is directly
 > used in an assignment).

The intent is for it only to apply to temporaries that result
from a cast.  I suspect that this is not necessarily trivial in
the compiler -- if an expression is of type double, and I cast
it to double, it's quite possible that there is no way of
expressing this in the intermediate language that is passed to
the back end.

 > This is mostly a quibble.  I'd expect most programmers would use
 > assignment-to-a-named-variable for this operation.

Well, I would:-).

--=20
James Kanze                                    kanze.james@neuf.fr
Conseils en informatique orient=E9e objet/
                   Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France +33 (0)1 30 23 00 34

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



