[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: mapping 754R to specific languages
Le lundi 30 juillet 2007 à 07:06 +0100, Nick Maclaren a écrit :
Look, if you want ANY reduction in the hostility to ANY introduction
of a reproducibility requirement, you will first have to demonstrate
that it could be added to the specification of at least one important,
tricky language - like C++ or Fortran, not Java - in such a way that
it makes it possible to implement, possible to write code to and
comprehensible to a moderate expert.
So far, there is no evidence that this can be done, and several of us
don't think that it can be.
I can't speak for Fortran; but for C++ at least, I don't see anything in
the 754R+reproducibility draft that goes against the "basic concepts" of
the language (scopes, lookup, ODR, object lifetime, types, control flow,
and so on).
As a matter of fact, it would be quite easy to provide the user with a
library that gives perfect and complete compliance to the 754R draft.
And C++ is powerful enough, so that it would be simple to write code
using this library. I mean, you could just type a + b * c and it would
do what you expect it to do (for proofs of concept, see the numerous C++
wrappers to the MPFR library).
The obvious downside is that this library would not modify the "float"
and "double" primitive types of the language, and you would have to use
a new type to store the floating-point values. But as far as I know,
nothing in the 754R draft requires floating-point values to be
represented by an existing primitive type (whatever that could mean for
other languages).
So I'm convinced that you can add a floating-point reproducibility
requirement to the draft, and that it can be implemented in C++ without
even modifying the language, and that one can write code for it without
any trouble, even when one is a beginner.
Best regards,
Guillaume