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

Re: mixed decimal floating and binary floating arithmetic



Dan Zuras IEEE wrote:

  That is, mixed radix
      operations should be disallowed. 
  
...
      It was our intent that Fortran disallow it as well.
  
Fortran has always allowed this. It seems unlikely that we will choose
to be deliberately incompatible with previous standards; not impossible,
but unlikely.

Since mixed-mode operations between 32-bit integer and single precision,
or 64-bit integer and double precision, have the "undesirable"
characteristic of the conversion not being to a superset, and those
don't seem to be disapproved of, I find it hard to get exercised over
the possibility of the user mixing binary and decimal.

For that matter, operations involving single-precision complex and
double precision real are similarly "bad". In fact enormously worse than
mixing similar precisions of binary and decimal!

      Realize that it is IMPLICIT conversions that are being
      disallowed.  You may still support mixed radix operations so
      long as the programmer specifies the radix of the operation
      by EXPLICITLY converting one operand to the other's radix.
  
I also doubt that explicit conversions demonstrate very much intent.
Some intent, yes.

In any event, since mixed binary/decimal mode arithmetic is going to be
slow it is highly likely that compilers will produce warning messages
when it happens. (For that matter, since decimal mode is going to be
slow many compilers will doubtless produce warning messages for all use
of decimal, at least until there is reasonable hardware support. Or just
not support decimal at all until that time.)

Cheers,
-- 
..................................Malcolm Cohen, Nihon Numerical
Algorithms Group KK, Tokyo.
(Project editor for Fortran 2008.)


754 | revision | FAQ | references | list archive