J.3 Reduced Accuracy Subtypes
may be used to define a floating point subtype with a new value for its
requested decimal precision, as reflected by its Digits attribute. Similarly,
may be used to define an ordinary fixed point subtype with a new value
for its delta
, as reflected by its Delta attribute.
It might be more direct to
make these attributes specifiable via an attribute_definition_clause
and eliminate the syntax for these _constraint
Name Resolution Rules
We may need a better way to deal with obsolescent
features with rules that contradict those of the non-obsolescent parts
of the standard.
with a floating point subtype if the value of the
is no greater than the requested decimal precision of the subtype, and
if any, is compatible with the subtype.
A numeric subtype is considered
“constrained” only if a range constraint applies to it. The
only effect of a digits_constraint
or a delta_constraint
without a range_constraint
is to specify the value of the corresponding Digits or Delta attribute
in the new subtype. The set of values of the subtype is not “constrained”
in any way by such _constraint
Wording Changes from Ada 83
In Ada 83, a delta_constraint
is called a fixed_point_constraint, and a digits_constraint
is called a floating_point_constraint. We have adopted other terms because
apply primarily to decimal fixed point types now (they apply to floating
point types only as an obsolescent feature).
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe