Ada Programming/Attributes/'Scaling
Appearance
Description
[edit | edit source]Scaling by a power of the hardware radix.
Let v be the value X · T'Machine_RadixAdjustment. If v is a machine number of the type T, or if |v| ≥ T'Model_Small, the function yields v; otherwise, it yields either one of the machine numbers of the type T adjacent to v. Constraint_Error is optionally raised if v is 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’Scaling (X:T;Adjustment:universal_integer) return T