From: "David McClain" <dmcclain@azstarnet.com>
To: <caml-list@inria.fr>
Subject: The Pentium Non-Bug
Date: Fri, 3 Sep 1999 14:41:20 -0700 [thread overview]
Message-ID: <000501bef655$5ce7a2d0$210148bf@dylan> (raw)
In light of my recent trip around the mulberry bush, I thought I would post
a preamble from some of my code for everyone's sake.
- DM
(* ------------------------------------------------------------ *)
(* Considerable care has been taken to be IEEE correct *)
(* in the face of distinct (+0.0) and (-0.0). *)
(* The rules of the game are: *)
(* Addition => commutative a + b = b + a *)
(* Subtraction => anticommutative a - b = -(b - a) *)
(* Multiplication => commutative a * b = b * a *)
(* Division => inverse-commutative a / b = 1.0 / (b / a) *)
(* Identity under addition: *)
(* x + (-0.0) = x but x + (+0.0) != x *)
(* Identity under subtraction: *)
(* x - (+0.0) = x but x - (-0.0) != x *)
(* Negation by subtraction: *)
(* (-0.0) - x = neg x (= FCHS x) but (+0.0) - x != neg x *)
(* Equivalence of subtraction by addition of negative: *)
(* a - b = a + neg b *)
(* Distribution of negation: *)
(* a - b = -(b - a) = -b - (-a) = -b + a *)
(* ;; remember that addition is commutative *)
(* Complex conjugation by negation: *)
(* conj(re,im) = (re, -im) != (re, 0 - im) *)
(* Since the constant 0.0 generally denotes (+0.0) and since it is *)
(* generally difficult to determine the sign of a given *)
(* zero constant value, one simply cannot assume that: *)
(* 0.0 + x = x *)
(* x - 0.0 = x *)
(* 0.0 - x = neg x *)
(* Rather, one must carry out what appears to be a null operation, *)
(* and be certain to negate when appropriate, instead of subtracting *)
(* from zero. *)
reply other threads:[~1999-09-06 8:25 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='000501bef655$5ce7a2d0$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