From owner-sc22wg5@open-std.org  Thu Oct 27 11:58:51 2005
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-domo2
Delivered-To: sc22wg5-domo2@open-std.org
Received: by open-std.org (Postfix, from userid 521)
	id 4725512AE9; Thu, 27 Oct 2005 11:58:51 +0200 (CET DST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from dkuug.dk (ptah.dkuug.dk [195.215.30.66])
	by open-std.org (Postfix) with ESMTP id B0EB711473
	for <sc22wg5@open-std.org>; Thu, 27 Oct 2005 11:58:44 +0200 (CET DST)
Received: from oin.rl.ac.uk (oin.rl.ac.uk [130.246.135.200])
	by dkuug.dk (8.12.10/8.9.2) with ESMTP id j9R9wWZb052000
	for <sc22wg5@dkuug.dk>; Thu, 27 Oct 2005 11:58:37 +0200 (CEST)
	(envelope-from j.k.reid@rl.ac.uk)
X-RAL-MFrom: <j.k.reid@rl.ac.uk>
X-RAL-Connect: <jkr.cse.rl.ac.uk [130.246.9.202]>
Received: from jkr.cse.rl.ac.uk (jkr.cse.rl.ac.uk [130.246.9.202])
	by oin.rl.ac.uk (8.12.11/8.12.11) with ESMTP id j9R91DSe023363
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 27 Oct 2005 10:01:13 +0100
Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1])
	by jkr.cse.rl.ac.uk (8.12.10/8.12.8) with ESMTP id j9R93O89014103;
	Thu, 27 Oct 2005 10:03:24 +0100
Message-ID: <436097DC.5000408@rl.ac.uk>
Date: Thu, 27 Oct 2005 10:03:24 +0100
From: John Reid <j.k.reid@rl.ac.uk>
Reply-To: j.k.reid@rl.ac.uk
Organization: Rutherford Appleton Laboratory
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050811 Fedora/1.7.10-1.1.1.legacy
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: WG5 <sc22wg5@dkuug.dk>
Cc: "Stevens, Charles C" <Charles.Stevens@unisys.com>
Subject: Re: SC22 meeting
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-CCLRC-SPAM-report: -4.9 : BAYES_00
X-Scanned-By: MIMEDefang 2.39
X-Spam-Score: 0 () 
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

WG5,

In my message of 7 October, I said

> The other resolutions that affect us are
>
> 1. Resolution 05-08: Revision of IEEE 754 Standard for Floating-Point
> Arithmetic
>
> We are asked to provide our input regarding requirements for our decimal
> floating-point work. The Cobol convener gave me to understand that the
> current problems are associated with choosing the base: 10 or 1000.
> Cobol very firmly wants 10. I said that we had no strong views on this
> and would probably support whatever the standard finally says. Does
> anyone disagree?

I have looked into this further and find that there is no suggestion of the use
of any base other than 2 or 10. The deadlock is over how to represent decimal
floating-point numbers. Some members of the IEEE committee use the term 'base
1000' for encodings that group the digits into sets of 3 (which can be
represented efficiently in 10 bits). I was misled and in turn misled you. Sorry!

The principle contenders are

1.  Densely-Packed Decimal (DPD).
                                         Values
     1 bit for the manitissa sign.      1  1   1
     5 bits for the 'combination'.      5  5   5
     w bits for the exponent.           6  8  12
   10J bits for 3J manitissa digits.   20 50 110
                             Totals    32 64 128

     This allows the following for the numbers of mantissa digits
     and the exponent ranges:

                  digits emax emin
                    7     96   -95
                   16    384  -383
                   34   6144 -6143

     The key is that the 5 bits of the combination are enough to hold one
     decimal digit (part of the mantissa) and one base-3 digit (part of the
     exponent).

2. Binary Interchange Decimal (BID)

    The numbers of mantissa digits and the exponent ranges are as for DPD.
    The essential difference is that the mantissa is held as a binary number.
    This needs 10J+4 bits. If the leading digit is zero, it is held directly
    in 10J+3 bits. If the leading digit is one, the second digit is zero and
    the trailing 10J+1 bits are held directly.

The advantage of BID is that is it easier to simulate with software and
floating-point arithmetic runs faster. The disadvantage is for actions
that depend on the digits themselves, such as shifting or extraction of digit
groups.

It is DPD that the Cobol people favour.

It has also been proposed that decimal arithmetic be removed altogether. I think 
that would be a shame. We all use decimal arithmetic for our thinking and hand 
calculations. It would be great if our computers did, too - for example, no 
rounding would be needed for formatted output. Does anyone disagree with this 
position?

Of course, the Cobol people strongly favour retention of decimal arithmetic in 
the new standard.

Cheers,

John.

