public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
To: law@cygnus.com
Cc: egcs@cygnus.com
Subject: Re: /internet
Date: Thu, 17 Dec 1998 04:43:00 -0000	[thread overview]
Message-ID: <19981217134318.C9897@rigel.inria.fr> (raw)
In-Reply-To: <28398.913854887@hurl.cygnus.com>

On Wed, Dec 16, 1998 at 05:34:47PM -0700, Jeffrey A Law wrote:
> [...] Though
> I believe in the case reassociating a series of multiplies we are safe.
>
> I challenge anyone to come up with a case where a reassociation of
> a * b * c * d  produces different results than ((a * b) * c) * d.

If you want that, you'd better first _prove_ that it works in every case.
But you won't be able to do so because it's false.

It might be true when the following both conditions are met:
- no intermediate overflow/underflow appears (nor denormalized numbers).
- the rounding mode is set to nearest.

I'd be interested in reading the proof in this case (if it's true).

Case if you have an intermediate overflow is easy:
DBL_MAX * DLB_MAX * DBL_MIN  gives you either Inf or DBL_MAX.
Case when rounding is set to +Infinity:
0.1 * 0.1 * -1.0  doesn't give you the same result, try it.

-- 
Sylvain

  parent reply	other threads:[~1998-12-17  4:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-15 15:06 /internet tprince
1998-12-15 19:12 ` /internet Stephen L Moshier
1998-12-15 19:21   ` /internet Joe Buck
1998-12-15 19:37     ` /internet Jeffrey A Law
1998-12-16  7:58       ` /internet Tim Hollebeek
1998-12-16  8:41         ` /internet Joe Buck
1998-12-16 11:45           ` /internet Stephen L Moshier
1998-12-16 11:59             ` /internet Joe Buck
1998-12-16 13:19               ` /internet Chip Salzenberg
1998-12-16 16:20                 ` /internet Jeffrey A Law
1998-12-16 17:42                   ` /internet Joern Rennecke
1998-12-17  9:46                     ` /internet Horst von Brand
1998-12-16 16:37               ` /internet Jeffrey A Law
1998-12-16 16:56                 ` /internet Per Bothner
1998-12-17 20:20                   ` /internet Jeffrey A Law
1998-12-16 17:52                 ` /internet Joern Rennecke
1998-12-17  4:43                 ` Sylvain Pion [this message]
1998-12-17 10:26               ` /internet Craig Burley
1998-12-15 23:08     ` /internet Matthias Urlichs
1998-12-16  9:33       ` /internet Craig Burley
1998-12-16  5:44     ` /internet Stephen L Moshier
1998-12-16  9:37   ` /internet Craig Burley
  -- strict thread matches above, loose matches on Subject: below --
1998-12-16 12:34 /internet Geert Bosch
1998-12-16 13:02 ` /internet Harvey J. Stein
1998-12-16 16:25 ` /internet Jeffrey A Law
1998-12-04 17:41 /internet tprince

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=19981217134318.C9897@rigel.inria.fr \
    --to=sylvain.pion@sophia.inria.fr \
    --cc=egcs@cygnus.com \
    --cc=law@cygnus.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).