From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,338371dbbe7075d X-Google-Attributes: gid103376,public From: kst@aonix.com (Keith Thompson) Subject: Re: [Q] Portability of <= and >= with real operands Date: 1996/12/04 Message-ID: #1/1 X-Deja-AN: 202405431 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: pulsar references: organization: Aonix, San Diego, CA, USA newsgroups: comp.lang.ada originator: kst@pulsar Date: 1996-12-04T00:00:00+00:00 List-Id: In 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 <*> 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