comp.lang.ada
 help / color / mirror / Atom feed
From: kst@aonix.com (Keith Thompson)
Subject: Re: [Q] Portability of <= and >= with real operands
Date: 1996/12/04
Date: 1996-12-04T00:00:00+00:00	[thread overview]
Message-ID: <E1wxJD.3Az@thomsoft.com> (raw)
In-Reply-To: E1uEEs.2xJ.0.-s@inmet.camb.inmet.com


In <E1uEEs.2xJ.0.-s@inmet.camb.inmet.com> stt@houdini.camb.inmet.com (Tucker Taft) writes:
> Are you also saying that X <= Y is somehow "better" than not (X > Y)?
> That is truly mysterious, if so.

Of course not.  Ignoring NaNs and readability, X <= Y is identical
to not (X > Y).

The original statement was that AQ&S recommends using "<=" rather than "<"
because it's more portable.  The general consensus (with which I agree)
is that that's absurd as a general statement.  I was merely speculating
on a possible rationale for the original (incorrect) statement by trying
to construct a specific case in which X <= Y might be safer than X < Y,
even if X is mathematically known to be less than Y.  (Even this is not
entirely safe, since roundoff errors could cause X to be greater than Y.)

This is tricky stuff.  I probably know just enough about numerical
analysis to be dangerous.

-- 
Keith Thompson (The_Other_Keith) kst@aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
"SPOON!" -- The Tick




  parent reply	other threads:[~1996-12-04  0:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-29  0:00 [Q] Portability of <= and >= with real operands JP Thornley
1996-11-29  0:00 ` Robert Dewar
1996-12-03  0:00   ` Keith Thompson
1996-12-03  0:00     ` Tucker Taft
1996-12-03  0:00       ` Larry Kilgallen
1996-12-03  0:00         ` Robert Dewar
1996-12-04  0:00       ` Keith Thompson [this message]
1996-12-03  0:00     ` Thomas Koenig
1996-12-03  0:00     ` Robert Dewar
1996-12-01  0:00 ` Tucker Taft
1996-12-02  0:00   ` Norman H. Cohen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox