From -113911901717061605
X-Google-Thread: f78e5,9ea02bfab7bc90f
X-Google-NewGroupId: yes
X-Google-Attributes: gid7894ca11fe,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news1.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: Mon, 29 Mar 2010 13:20:17 -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: <f283337a-9585-471a-8c53-afa72ab416fa@a4g2000prb.googlegroups.com>
References: <71C0DB7F-160E-4393-A3AE-39C1AC6B6C7D@mac.com>
Content-Type: text/plain; charset=ISO-8859-1
X-Original-Date: Sun, 28 Mar 2010 14:18:20 -0700 (PDT)
X-Submission-Address: std-c++@netlab.cs.rpi.edu
Date: Mon, 29 Mar 2010 13:12:48 CST
Lines: 35
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-2JHR9+bKP+Pihk+ecxjQQpfeFU0SGbNtThQpWrVQ9sdj6U0n89+3tXFS+eHeK2Y5J1iIi+6rCNJ1aab!/uJVDq5KPXkDHifpvNGe2YJTxfyU2vAakPHFMTf+4Kx6JzLTIPpmKuTT2uaQaKdmUDhO6iAtkLCC!zLw4wLuV3+EnkFHzRtncMU0kIw==
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: g2news2.google.com comp.std.c++:2332

>From the IEEE-754 (1985) / IEC559 (1989) spec:

"3.3. Extended Formats
The single extended and double extended formats encode in an
implementation-dependent way the sets of values in 3.1 subject to the
constraints of Table 1."

Those requirements actually boil down to: precision of at least 64
bits, exponent range of at least [-16382, +16383], exponent width of
at least 15 bits, and a total encoding width of at least 79 bits.
These requirements are obviously satisfied by the Intel 80 bit format
(indeed, the standard was written with that format in mind).

The standard further requires that correctly rounded basic operations
be provided for any arithmetic type.  The x87 FPU hardware provides
said operations for the 80-bit (with some library support for certain
conversions).

The C++ spec says that is_iec559 is "true if and only if the type
adheres to IEC 559 standard."  It does *not* say "is a basic format of
the IEC559 standard".  The 80-bit type adheres to the IEC 559 standard
as an extended type, and therefor is_iec559 correctly returns true for
that type.

Note that none of this changes in the 2008 revision of the IEEE-754
document.  The 80-bit format satisfies the requirements of an extended
format associated with the binary64 format, and as such "adheres to
the standard".

--
[ 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]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]



