Prev | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help


A.5.3 Attributes of Floating Point Types

Static Semantics
(1)
The following representation-oriented attributes are defined for every subtype S of a floating point type T.
(2)
S'Machine_Radix
(3)
The values of other representation-oriented attributes of a floating point subtype, and of the ``primitive function'' attributes of a floating point subtype described later, are defined in terms of a particular representation of nonzero values called the canonical form. The canonical form (for the type T) is the form
       +/-mantissa*T'Machine_Radix**exponent

where
(4)
(5)
(6)
S'Machine_Mantissa
(7)
S'Machine_Emin
(8)
S'Machine_Emax
(9)
S'Denorm
           +/-mantissa*T'Machine_Radix**T'Machine_Emin
(10)
The values described by the formula in the definition of S'Denorm are called denormalized numbers. A nonzero machine number that is not a denormalized number is a normalized number. A normalized number x of a given type T is said to be represented in canonical form when it is expressed in the canonical form (for the type T) with a mantissa having T'Machine_Mantissa digits; the resulting form is the canonical-form representation of x.
(11)
S'Machine_Rounds
(12)
S'Machine_Overflows
(13)
S'Signed_Zeros
(14)
For every value x of a floating point type T, the normalized exponent of x is defined as follows:
(15)
(16)
(17)
The following primitive function attributes are defined for any subtype S of a floating point type T.
(18)
S'Exponent
(19)
           function S'Exponent (X : T)
             return universal_integer
(20)
(21)
S'Fraction
(22)
           function S'Fraction (X : T)
             return T
(23)
(24)
S'Compose
(25)
           function S'Compose (Fraction : T;
                               Exponent : universal_integer)
             return T
(26)
(27)
S'Scaling
(28)
           function S'Scaling (X : T;
                               Adjustment : universal_integer)
             return T
(29)
(30)
S'Floor
(31)
           function S'Floor (X : T)
             return T
(32)
(33)
S'Ceiling
(34)
           function S'Ceiling (X : T)
             return T
(35)
(36)
S'Rounding
(37)
           function S'Rounding (X : T)
             return T
(38)
(39)
S'Unbiased_Rounding
(40)
           function S'Unbiased_Rounding (X : T)
             return T
(41)
(42)
S'Truncation
(43)
           function S'Truncation (X : T)
             return T
(44)
(45)
S'Remainder
(46)
           function S'Remainder (X, Y : T)
             return T
(47)
(48)
S'Adjacent
(49)
           function S'Adjacent (X, Towards : T)
             return T
(50)
(51)
S'Copy_Sign
(52)
           function S'Copy_Sign (Value, Sign : T)
             return T
(53)
(54)
S'Leading_Part
(55)
           function S'Leading_Part (X : T;
                                    Radix_Digits : universal_integer)
             return T
(56)
(57)
(58)
(59)
(60)
S'Machine
(61)
           function S'Machine (X : T)
             return T
(62)
(63)
The following model-oriented attributes are defined for any subtype S of a floating point type T.
(64)
S'Model_Mantissa
(65)
S'Model_Emin
(66)
S'Model_Epsilon
(67)
S'Model_Small
(68)
S'Model
(69)
           function S'Model (X : T)
             return T
(70)
(71)
S'Safe_First
(72)
S'Safe_Last

Prev | Up | Next | Back | Forward
TOC -- / --.-- / --.--.-- | Index | Search | Syntax | Help

Ada WWW Home -- Email comments, additions, corrections, gripes, kudos, etc. to:

Magnus Kempe -- Magnus.Kempe@di.epfl.ch
Copyright statement
Page last generated: 95-03-12