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,dcab94c78b71ea2b X-Google-Attributes: gid103376,public From: "Robert I. Eachus" Subject: Re: Fixed Point Numbers Date: 1999/06/09 Message-ID: <375EBE60.5C3A61DD@mitre.org>#1/1 X-Deja-AN: 487606527 Content-Transfer-Encoding: 7bit References: <374DBCE1.9FB720E6@mitre.org> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: The MITRE Corporation Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-06-09T00:00:00+00:00 List-Id: Robert A Duff wrote: > You misspelled "confusingly". ;-) No, I meant cleverly: "An ordinary_fixed_point_definition defines an ordinary fixed point type whose base range includes at least all multples of small that are between the bounds specified in the real_range_specification. The base range of the type does not necessarily include the specified bounds themselves. An ordinary_fixed_point_definition also defines a constrained subtype of the type, with each bound of its range given by the closer to zero of: " the value of the conversion to the fixed point type of the corresponding expression of the real_range_specification; " the corresponding bound of the base range." RM 3.5.9 (13-15) In Ada 83 the wording was very confusing and led to more than one AI (AI-143, AI-144, and AI-340): "For a fixed point constraint that includes a range constraint, the model numbers include zero and all multiples of small whose mantissa can be expressed using exactly B binary digits, where the value of B is chosen as the smallest integer number for which each bound of the specified range is either a model number or lies at most small distant from a model number..." RM83 3.5.9(6) > After all, I don't expect this: > type T is range -2**31..2**31; > to fit in 32 bits! Good, because in Ada 95, it may fit, but it need not. For example on 36-bit, 48-bit, or 64-bit machines, I would expect objects of this type by default to fit in one word and have 2**32 + 1 possible values for the subtype. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...