--- ais/ai-00100.txt 2004/04/06 19:56:53 1.4 +++ ais/ai-00100.txt 2004/04/30 02:35:37 1.5 @@ -1,11 +1,13 @@ -!standard 04.09 (38) 04-03-23 AI95-00100/04 -!class confirmation 99-03-21 +!standard 04.09 (38) 04-04-22 AI95-00100/05 +!standard 03.05.09 (08) +!class binding interpretation 04-04-22 +!status work item 04-04-07 !status ARG Approved 9-0-0 04-03-05 !status work item 95-10-21 !status received 95-10-12 !priority Low !difficulty Medium -!subject Truncation required for static expressions if Machine_Rounds is False +!subject Truncation required for static expressions if Machine_Rounds is false !summary @@ -18,8 +20,22 @@ Is the intent of 4.9(38) to require truncation for values of static expressions if Machine_Rounds is false? (Yes.) -!response +What are the machine numbers of a fixed point type? (The representable +multiples of small.) +!recommendation + +(See wording.) + +!wording + +Add after the first sentence of 3.5.9(8): + +The machine numbers of a fixed point type are the values of the type that can +be represented exactly in every unconstrained variable of the type. + +!discussion + Paragraph 4.9(38) reads: "For a real static expression that is not part of a larger static @@ -39,6 +55,38 @@ require this evaluation to be done without Overflow_Checks. In other words this evaluation in general cannot be done using normal machine arithmetic. +There is one subtle problem, though, because 4.9(38) mentions machine numbers, +but machine number are only defined for floating-point types (in 3.5.7(8)). For +4.9(38) to make sense, they must be defined for fixed-point types. So we are +adding a sentence to 3.5.9(8) to provide this definition. + +!corrigendum 3.5.9(8) + +@drepl +The set of values of a fixed point type comprise the integral multiples of a +number called the @i<small> of the type. For a type defined by an +@fa<ordinary_fixed_point_definition> (an @i<ordinary> fixed point type), the +@i<small> may be specified by an @fa<attribute_definition_clause> (see 13.3); if so +specified, it shall be no greater than the @i<delta> of the type. If not +specified, the @i<small> of an ordinary fixed point type is an +implementation-defined power of two less than or equal to the @i<delta>. +@dby +The set of values of a fixed point type comprise the integral multiples of a +number called the @i<small> of the type. The @i<machine numbers> of a fixed +point type are the values of the type that can be represented exactly in every +unconstrained variable of the type. For a type defined by an +@fa<ordinary_fixed_point_definition> (an @i<ordinary> fixed point type), the +@i<small> may be specified by an @fa<attribute_definition_clause> (see 13.3); +if so specified, it shall be no greater than the @i<delta> of the type. If not +specified, the @i<small> of an ordinary fixed point type is an +implementation-defined power of two less than or equal to the @i<delta>. + +!ACATS Test + +ACATS tests C490001 and C490002 tests 4.9(38), including the rounding +directions confirmed by this AI (and the fixed point rounding that was not +defined properly). So no further tests are needed. + !appendix !section 4.9(38) @@ -213,5 +261,28 @@ Editor's note: The priority of this AI was changed based on ARG discussion in November 2000. + +**************************************************************** + +From: Randy Brukardt +Sent: Wednesday, April 7, 2004 8:26 PM + +We approved several dormant AIs at the last meeting without going back to +see what the last discussion of the AI had decided. I've done this as part +of creating the minutes. It appears that AI-100 has a significant issue that +hasn't been addressed. + +In Burlington (meeting 8), we decided that the basic question answer was +correct. However, this paragraph (4.9(38)) applies to all real static +expressions - which obviously includes fixed point static expressions. But +fixed point static expressions don't have machine numbers. So what does this +paragraph mean for a fixed point static expression? + +The conclusion in Burlington was to define a machine number of a fixed point +type to be a multiple of the Small. Wording was intended to be added to +address this. + +The adjustments to 4.9(38) in AI-268 also do not address this problem. It +seems to me that it ought to be addressed. ****************************************************************

Questions? Ask the ACAA Technical Agent