Re: P1788 1.8 "Language considerations"
On Dec 7 2012, Vincent Lefevre wrote:
Specifically, a language shall specify a set of bindings to the
I would say "a language or implementation" because the implementation
could be just a library.
A good point. "Language or other binding mechanism" would be better,
as there need be no associated implementation.
operations specified in this standard, with the functionality and
semantics as specified here. These may be specified as bindings
to built-in operations, library procedures or otherwise.
Code which is syntactically the same as code operating on
approximate real numbers, but operating on intervals, shall obey
I don't think this makes sense (perhaps except for OO languages).
Well, that includes C, C++, Fortran, Matlab, Mathematica etc. Also,
some languages and/or implementations may have an option to treat
declared reals as intervals. I agree that the wording isn't good, but
I can't think of a better.
And "approximate real numbers" is ambiguous (is an integer such an
approximate real number?). And what about interval operations that
could not correspond to operations on approximate real numbers,
such as intersection, union, reverse operations?
See the preceding paragraph to the one I replaced for the context.
But I agree that the wording isn't good; again, I can't think of a
better.
And what about interval operations that
could not correspond to operations on approximate real numbers,
such as intersection, union, reverse operations?
They are covered in the first replacement paragraph.
the following semantics: if the data before and after the unit of
transformation are regarded as two sets of mathematical intervals,
the transformed form of all combinations of the elements (the real
values) represented by the prior set shall be a member of the
posterior set. A language may specify a mode and constraints on
programs in which all implementations are required to deliver the
same results, but is not required to.
I think this should be more general to include constructors,
operations that return a number (such as mid), and so on, i.e. all
the data (whether interval, number, text...) that can appear as
input or output of a unit of transformation.
I agree that the handling of constants should be specified explicitly.
I don't understand. They are covered by the first sentence if the
language has them; I am extremely reluctant to be that explicit as, for
example, the concept of constructors occurs in only a few languages.
If they are not, they are covered in the first replacement paragraph.
Regards,
Nick Maclaren.