From -4569831299143315144
X-Google-Thread: f78e5,9ea02bfab7bc90f
X-Google-NewGroupId: yes
X-Google-Attributes: gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 02 Apr 2010 11:40:02 -0500
Return-Path: <cppmods@ruralroute.cs.rpi.edu>
To: (Usenet)
From: Steve <stephentyrone@gmail.com>
Newsgroups: comp.std.c++
Subject: Re: Defect Report: is_iec559 should be defined in terms of binary        format
Organization: http://groups.google.com
Sender: cppmods@cs.rpi.edu
Approved: austern@google.com
Message-ID: <bec31efc-51c3-4150-b553-c76132230421@x12g2000yqx.googlegroups.com>
References: <71C0DB7F-160E-4393-A3AE-39C1AC6B6C7D@mac.com>
 <f283337a-9585-471a-8c53-afa72ab416fa@a4g2000prb.googlegroups.com>
 <ca84cb1f-7699-4788-a429-359a1b9ed6a9@o30g2000yqb.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Original-Date: Thu, 1 Apr 2010 14:02:47 -0700 (PDT)
X-Submission-Address: std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
Date: Fri,  2 Apr 2010 11:33:55 CST
Lines: 45
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-kg6XY8/7drGj1+Dakqxf3YO03SCUTcDvE8YCuk2CgpPv/2XHchobPDPAzHkzypPgIfvUfCqwMvDxRc0!+JGB9s90MLSG/jh9lGVASidlogLftlCIUZkQjFPeBnFaxu52v1q+fwfSKz14jvvHhh8l9M8hkYG3!emH5j0JYWNebYD6JXQkQ8VTGjec=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
Xref: g2news1.google.com comp.std.c++:2361

On Mar 31, 9:51 pm, Potatoswatter <pot...@gmail.com> wrote:

> It would also correctly return true if double implemented extended-
> single

Rightly so.

> GNU simply sets "is_iec559 = has_infinity && has_quiet_NaN &&
> has_denorm == denorm_present." As specified, is_iec559 is redundant
> and misleading.

If the GNU tools indeed define is_iec559 that way for all formats on
all machines, I would argue that there is bug in the GNU
implementation; IEC559 places requirements not only on the available
values in a format, but also requires that operations are correctly
rounded, that the four basic rounding modes are supported, that edge
cases produce specified results, and that certain means to handle
exceptional conditions are provided.  For example, the somewhat
obscure 16 byte "double-double" (or "dirty-double") head-tail format
should not have is_iec559 == true despite the fact that it has
encodings for infinity, quiet NaN and denormals, as operations are not
correctly rounded (in typical implementations).

> If it were restricted to basic types, it would usefully identify
encodings.

As I understand it, the intent is not to uniquely identify encodings,
but rather to indicate that a type supports all the standardized
IEC559 features to allow users to take advantage of them in a more
portable fashion.  If you want unique type identifiers, I think you
really want the standard to define a header like <cstdint> that
provides typenames along the lines of "float32_t", "float64_t" and
"float128_t" that are explicitly bound to the IEEE-754 (2008)
binary32, binary64, and binary128 types (and probably names for the
new decimal floating-point types as well).


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



