From 4203360328703358416
X-Google-Thread: f78e5,eb811809d4f61b12
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: wade@stoner.com
Newsgroups: comp.std.c++
Subject: Re: Using extended precision in floating point
Date: Fri, 19 May 2006 12:58:11 CST
Organization: http://groups.google.com
Lines: 26
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <1148043502.821551.249470@y43g2000cwc.googlegroups.com>
References: <1147882581.972497.100340@u72g2000cwu.googlegroups.com>
   <pxbwtcjbv8l.fsf@news.bourguet.org>
   <1148033537.225653.254200@j55g2000cwa.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1148043508 6015 127.0.0.1 (19 May 2006 12:58:28 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 19 May 2006 12:58:28 +0000 (UTC)
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Original-To: std-c++@mailman.ucar.edu
Delivered-To: std-c++@mailman.ucar.edu
Delivered-To: std-c++@ucar.edu
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: y43g2000cwc.googlegroups.com; posting-host=65.16.217.10;
   posting-account=1rcVOQwAAACiq302N7tDjZ9huexzBBxn
X-Virus-Scanned: amavisd-new at ucar.edu
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Xref: g2news2.google.com comp.std.c++:2071

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).

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

---
[ 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                      ]



