abs
, and the exponentiating operator.
T'EMAX = 4*T'MANTISSA
T'EPSILON = 2.0**(1 - T'MANTISSA)
T'SMALL = 2.0**(-T'EMAX - 1)
T'LARGE = 2.0**T'EMAX * (1.0 - 2.0**(-T'MANTISSA))
T'BASE'EMAX <= T'SAFE_EMAX
T'BASE'SMALL >= T'SAFE_SMALL
T'BASE'LARGE <= T'SAFE_LARGE
fixed_accuracy_definition [range_constraint]
fixed_accuracy_definition ::=
delta
static_simple_expression
sign * mantissa * small
type
T is delta
D range
L .. R;
type
fixed_point_type is new
predefined_fixed_point_type;
subtype
T is
fixed_point_type
range
fixed_point_type(L) .. fixed_point_type(R);
type
VOLT is delta
0.125 range
0.0 .. 255.0;
subtype
ROUGH_VOLTAGE is
VOLT delta
1.0; -- same range
-- as VOLT
-- space in a word on a two's complement machine can be
-- declared as the type FRACTION:
constant
:= 1.0/2**(WORD_LENGTH - 1);
type
FRACTION is delta
DEL range
-1.0 .. 1.0 - DEL;
abs
.
T'LARGE = (2**T'MANTISSA - 1) * T'SMALL
T'SAFE_LARGE = T'BASE'LARGE
T'SAFE_SMALL = T'BASE'SMALL