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,f3f9104dada53163 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: An interesting quote on Java and C++ Date: 1997/10/07 Message-ID: #1/1 X-Deja-AN: 278519424 References: <97092509394068@psavax.pwfl.com> <342AD83E.2C92@gsg.eds.com> Organization: The Mitre Corp., Bedford, MA. Newsgroups: comp.lang.ada Date: 1997-10-07T00:00:00+00:00 List-Id: In article <342AD83E.2C92@gsg.eds.com> "Shmuel (Seymour J.) Metz" writes: AFAIK the only processors around that are not two's complement are... Ever use floating point? On most hardware today, floating point uses a (biased)two's-complement exponent and a sign and magnitude mantissa. So if you use the floating point engine to do integer arithmetic you get similar semantics to one's complement. (Signed zeros and range symmetric around zero.) Incidently Ada 95 makes it much easier to write code that does exact integer arithmetic using floating point types. This is important on many processors as the floating-point multiplication unit is faster than the integer multiply, and can be done in parallel with other operations. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...