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, MSGID_FROM_MTA_HEADER autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 126597,379c1e544eb51c83,start X-Google-Attributes: gid126597,public X-Google-ArrivalTime: 1982-11-02 03:28:41 PST Message-ID: Newsgroups: net.lang.ada Path: utzoo!decvax!harpo!duke!bcw X-Path: utzoo!decvax!harpo!duke!bcw From: duke!bcw Date: Tue Nov 2 06:28:40 1982 Subject: Re: Fixed point data in Ada X-Google-Info: Converted from the original B-News header Posted: Mon Nov 1 19:44:06 1982 Received: Tue Nov 2 06:28:40 1982 Date: 1982-11-02T06:28:40+00:00 List-Id: From: Bruce C. Wright @ Duke University Re: Fixed point data types in Ada The term "poor man's floating point" to describe the Ada fixed-point data type is not meant to be an exact description of the Ada data type (obviously a fixed radix point does not "float"), but was meant as a way of trying to describe the data type to people who had likely not encountered such a type in PL/I or Cobol. The term is not mine; consider this phrase from the "Rationale for the Design of the ADA Programming Language" by Ichbiah, Heliard, Roubine, Barnes, Krieg-Brueckner, and Wichmann: Section 5.1.2, paragraph 5 refers to the need for a "cheap floating point"; my precise term was borrowed from Peter Wegener in his book "Programming with Ada: an Introduction by means of Graduated Examples," Section 3.3, page 96. Secondly, although it is true that a number of real-world objects are defined in terms of fixed-point numbers (like time, money, etc), the Ada fixed-point facility is **not** sufficient for manipulating such things with 100% accuracy, but is subject to error. A private communication from Jerry Schwartz (harpo!eagle!jerry) indicates that the final report did clear up the ambiguity: the delta value must be a power of two and must be represented exactly. Note that this specifically excludes money or time data from use with the Ada fixed point data type, unless you don't mind rounding error. Also, fixed point is now apparently "optional" for the implementation (what became of the requirement for no subsets? Sounds like a subset to me!). Bruce C. Wright @ Duke University