Ada Programming/Attributes/'Machine
Appearance
Description
[edit | edit source]Machine representation of floating point argument.
If X is a machine number of the type T, the function yields X; otherwise, it yields the value obtained by rounding or truncating X to either one of the adjacent machine numbers of the type T.
Constraint_Error is raised if rounding or truncating X to the precision of the machine numbers results in a value outside the base range of S.
A zero result has the sign of X when S'Signed_Zeros is True.
Example
[edit | edit source]S’Machine (X:T) return T