Contents   Index   Search   Previous   Next


G.2 Numeric Performance Requirements

Implementation Requirements

1
   {accuracy} {strict mode} Implementations shall provide a user-selectable mode in which the accuracy and other numeric performance requirements detailed in the following subclauses are observed. This mode, referred to as the strict mode, may or may not be the default mode; it directly affects the results of the predefined arithmetic operations of real types and the results of the subprograms in children of the Numerics package, and indirectly affects the operations in other language defined packages. {relaxed mode} Implementations shall also provide the opposing mode, which is known as the relaxed mode.
1.a
Reason: On the assumption that the users of an implementation that does not support the Numerics Annex have no particular need for numerical performance, such an implementation has no obligation to meet any particular requirements in this area. On the other hand, users of an implementation that does support the Numerics Annex are provided with a way of ensuring that their programs achieve a known level of numerical performance and that the performance is portable to other such implementations. The relaxed mode is provided to allow implementers to offer an efficient but not fully accurate alternative in the case that the strict mode entails a time overhead that some users may find excessive. In some of its areas of impact, the relaxed mode may be fully equivalent to the strict mode.
1.b
Implementation Note: The relaxed mode may, for example, be used to exploit the implementation of (some of) the elementary functions in hardware, when available. Such implementations often do not meet the accuracy requirements of the strict mode, or do not meet them over the specified range of parameter values, but compensate in other ways that may be important to the user, such as their extreme speed.
1.c
Ramification: For implementations supporting the Numerics Annex, the choice of mode has no effect on the selection of a representation for a real type or on the values of attributes of a real type.

Implementation Permissions

2
   Either mode may be the default mode.
2.a
Implementation defined: Whether the strict mode or the relaxed mode is the default.
3
   The two modes need not actually be different.

Extensions to Ada 83

3.a
{extensions to Ada 83} The choice between strict and relaxed numeric performance was not available in Ada 83.

Contents   Index   Search   Previous   Next   Legal