public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Stephen L Moshier <steve@moshier.net>
To: Richard Henderson <rth@redhat.com>
Cc: gcc@gcc.gnu.org
Subject: Re: real.c fails floating point tests
Date: Fri, 18 Oct 2002 07:32:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0210180828190.28983-100000@moshier.net> (raw)
In-Reply-To: <20021016233835.GG30823@redhat.com>



On Wed, 16 Oct 2002, Richard Henderson wrote:

> Paranoia runs vs the 160 bit internal arithmetic *will* fail,

Yes, that is what I am talking about.  The decimal<->binary
uses this arithmetic and its pathological behavior makes it
hard to test and hard to analyze.  IEEE 754 and 854 provide the
results of an analysis, telling how high the arithmetic precision
must be to meet the requirements of the standard.  That analysis
assumes the arithmetic follows the other IEEE rules and therefore
it does not apply to this situation.  That leaves us in somewhat
of a quandry.

The guard and sticky bits are not supposed to be part of the number.
They are auxiliary variables used to implement the rounding rules.  It
is OK to keep the number in an undrounded state and preserve the
sticky bit somewhere else in the data structure.  But using the bottom
bit of the number for the sticky bit does not make arithmetic sense
for the 160-bit version.

Previously the REAL_VALUE_TYPE could not contain auxiliary
information, because often it was actually just emulating a host computer
double.  If you have removed that restriction then you can put various
other items into the data structure and then it looks like it would be
simple to make the 160-bit precision follow some arithmetic rules that
are easier to analyze and test.

  reply	other threads:[~2002-10-18 12:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-16  8:19 Stephen L Moshier
2002-10-16  9:47 ` Gabriel Dos Reis
2002-10-16 14:54 ` Richard Henderson
2002-10-16 15:29   ` Stephen L Moshier
2002-10-16 15:36     ` Richard Henderson
2002-10-16 17:20       ` Stephen L Moshier
2002-10-16 21:16         ` Richard Henderson
2002-10-18  7:32           ` Stephen L Moshier [this message]
2002-10-16  9:28 Robert Dewar
2002-10-16  9:58 Robert Dewar
2002-10-16 10:12 ` David Edelsohn
2002-10-16 10:16 ` Andrew Haley
2002-10-16 11:30   ` Stephen L Moshier
2002-10-16 10:23 ` Gabriel Dos Reis
2002-10-16 11:54 ` Mark Mitchell
2002-10-16 15:54   ` Richard Henderson
2002-10-16 16:31     ` Mark Mitchell
2002-10-17  5:22 Robert Dewar
2002-10-17  6:00 Robert Dewar
2002-10-17  8:55 Joern Rennecke
2002-10-17 13:44 ` Richard Henderson
2002-10-18  9:11 Robert Dewar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0210180828190.28983-100000@moshier.net \
    --to=steve@moshier.net \
    --cc=gcc@gcc.gnu.org \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).