Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "David McClain" <dmcclain@azstarnet.com>
To: <caml-list@inria.fr>
Subject: FP Computations
Date: Fri, 3 Sep 1999 23:52:53 -0700	[thread overview]
Message-ID: <000c01bef6a2$1dd6e4f0$210148bf@dylan> (raw)

Ohmygosh! I just ran a simple proof checker in Mathematica against the IEEE
FP spec with distinct (+0.0) and (-0.0). Do you realize that subtraction no
longer anti-commutes?

That is, in general there is no way to perform (a -. b) as a correction to
(b -. a). Subtraction almost anti-commutes, except when a = b. In that case
(a -. b) = +0.0, and (b -. a) = +0.0 also!  Hence we cannot expect that
(a -. b) = -. (b -. a).

Also can't use (-0.0) -. (b -. a) since that's exactly the same as direct
negation with FCHS.

Can't use (+0.0) -. (b -. a) since a might be -0.0 and b might be +0.0 in
which case (a -. b) = -0.0 and (b -. a) = (+0.0), and hence (+0.0) -. (b -.
a) = (+0.0) -. (+0.0) = (+0.0).

We're stuck! We MUST evaluate (a -. b) in the order indicated because there
is in general no way to correct the reverse order. Yikes!

- DM




                 reply	other threads:[~1999-09-06  8:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='000c01bef6a2$1dd6e4f0$210148bf@dylan' \
    --to=dmcclain@azstarnet.com \
    --cc=caml-list@inria.fr \
    /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