[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mapping 754R to specific languages



Guillaume Melquiond <guillaume.melquiond@xxxxxxxxxxx> wrote:

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).

Try initialization (3.6.2, basic.start.init, 6.7, stmt.decl), for a
start.  Actually, destructors are worse, but not in C++03 - it is
the planned introduction of threading and garbage collection in C++0X
that makes them such a nightmare.

Indeed, a general principle is that you can't allow floating-point
operations inside a destructor that might be called from a garbage
collector, if you want both IEEE 754 flags and reproducibility.
That is one of the many reasons that the IEEE 754 flag model always
was a Bad Idea - it was 1960s thinking, standardised in the 1980s.

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.

And I know that you can't.  The changes to C++03 are feasible (though
far more pervasive than you think), but the killer is that they
would block the currently planned enhancements for C++0X.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1@xxxxxxxxx
Tel.:  +44 1223 334761    Fax:  +44 1223 334679

754 | revision | FAQ | references | list archive