"Eryndlia Mavourneen" <
eryn...@gmail.com> wrote in message
news:3861a3cd-2513-4871...@googlegroups.com...
>...
> That said, we must assume that floating point values get translated
> *exactly*; that is,
>360.0 does not get translated to a machine type of 359.999999... or
>360.0111111...
Which of course makes no sense for most literals; it can only make sense for
values that already correspond to machine numbers, and those already require
exact conversion.
The problem I see with such syntax is what precisely happens when the bound
is not specified as a machine number? Say:
type My_Flt digits 5 range not 0.6 .. not 2.6;
Is this the same as the range without the "nots"? Or is it requiring
something less than some unknown value in a particular interval? I don't see
how that would be useful. Or are you going to require selecting a
*particular* machine number in this case? That would be a massive change
from the behavior of Ada currently, and probably would break some programs
(that aren't portable but do work) be changing the values of their literals.
The bounds of the range have to be machine numbers, as they don't have to be
static; as such, we don't care about values that aren't machine numbers. So
what exactly is this gaining over:
subtype My_Flt is Float range Float'Succ(0.0)..Float'Pred(360.0);
Randy.