(j3.2006) decimal floats

Craig Dedo craig
Sat Jan 12 18:08:26 EST 2008

-----Original Message-----
From: j3-bounces at j3-fortran.org [mailto:j3-bounces at j3-fortran.org] On Behalf
Of Andy Vaught
Sent: Saturday, January 12, 2008 13:21
To: fortran standards email list for J3
Subject: Re: (j3.2006) decimal floats

On Sat, 12 Jan 2008, Andy Vaught wrote:

> On Fri, 11 Jan 2008, Robert Corbett wrote:
> > 
> > I agree that implicit conversions should be banned.  There should be
> > functions for explicit conversions.  I suspect that most people do not
> > understand how expensive radix conversions are, especially for large
> > exponents.
> > 
> > Some people on the committee think arithmetic should be done in the
> > format used to represent values in memory.  That could create problems
> > for programs that use IEEE 754r's storage format such as binary16 and
> > decimal32.
>   The parsing and printing of binary numbers to and from ascii is a prime
> example of radix conversion.
>   The fortran philosophy of the past, however, is that you can even
> interoperate reals and integers without explicit conversion.  Or even
> adding reals to logicals on some implementations.  If people are concerned
> about speed, they're going to figure out not to do a conversion pretty
> quick, and, IMO, not use decimal arithmetic at all.

  Having given some more thought to this, I think the real insanity is a
chip that does floating point in two different radices.  If someone wants
to make a chip that does decimal floating point, fortran 90 will support
that perfectly-- radix(0.0) is 10 and everything else works as it should.  
If a chipmaker uses two radices, it means that they don't think that
decimal floating point will stand on its own and are hedging their bets.


	Well, the most widely used chip of all, the Intel 80x87 and its
successors, has two different radices.  It has both binary floating point
and Binary Coded Decimal (BCD) in hardware and has the hardware instructions
to do arithmetic in both binary floating point and BCD.  

	I strongly disagree about the suggested motivation for support for
decimal floating point.  It seems reasonable to conclude that the two
radices address the needs of different markets.  Thus, instead of being
contradictory, they very much could be complementary.  

Craig Dedo
17130 W. Burleigh Place
P. O. Box 423                       Voice Phone:  (262) 783-5869
Brookfield, WI   53008-0423  Fax Phone:  (262) 783-5928
USA                                     Mobile Phone:  (414) 412-5869
E-mail:  <cdedo at wi.rr.com> or <craig at ctdedo.com> 

More information about the J3 mailing list