(j3.2006) what now, 754r? - DFP in F2008?

Malcolm Cohen malcolm
Mon Sep 17 20:20:12 EDT 2007


On Fri, 14 Sep 2007 23:17:27 +0900, Tobias Burnus <burnus at net-b.de> wrote:
>> I don?t know if it makes sense to put DFP into Fortran 2008.

Every Fortran has had "support" for nonbinary FP: that includes decimal.
In particular F90 has quite good support (see the RADIX intrinsic).

The only lack is support for machines with more than one radix of FP,
and the missing item is some way of portably inquiring for a kind of
real with a specified radix.  (That is, inquiring within the program,
rather than looking up the compiler manual.)

Such machines will not be new with IEEE decimal, indeed there have been
machines with both hexadecimal and binary floating point in the recent
past.

> Given that 2008 is quite soon and that Fortran 2008 is (supposed to be)
> only a minor revision, I'm not sure whether it is too early for that.

The RADIX argument to SELECTED_REAL_KIND is less than minor, it is trivial.

> Thus I would be more in favour of putting it into a TR

...and it would be really daft to have a whole TR devoted to such a tiny
extension.

> Does anyone know the status of the ISO/IEC TR 24842 draft ("Extension
> for the programming language C to support decimal floating-point
> arithmetic")

I'm sorry but that extension is simply revolting.  For Fortran that kind
of approach is neither necessary nor desirable, in fact it is extremely
repugnant.

Whether C have managed to paint themselves into a corner such that they
need such an hideous kludge to support decimal I don't care to comment,
but it's not useful guidance for Fortran (unless you want to know how
*not* to do it).

There's plenty of other "cute" things in 754R that in the fullness of time
could well be desirable in Fortran (probably in a revision of one or more
of the IEEE intrinsic modules), but supporting those is not on the table
at this time.  Whether that should be the subject of a TR is a question for
a future committee.

Cheers,
-- 
Malcolm Cohen, Nihon Numerical Algorithms Group KK, Tokyo, Japan.



More information about the J3 mailing list