From: George Neuner on
On 26 May 2010 13:23:31 -0700, tar(a)sevak.isi.edu (Thomas A. Russ)
wrote:

>I've often wondered if something like BCD would make a come-back.
>Particularly if you developed hardware support for computations in a
>base-10 representation, you should be able to get reasonable speed and
>avoid the "impedance-mismatch" between the users and the computer.

I doubt it. A number of 8 and 16-bit chips had support for BCD, as
did some mini and mainframe processors - either directly or as a
storage format with pack/unpack or integer conversion instructions.
But AFAIK, x86 is the only popular 32-bit chip to have support for
BCD, and x86-64 has dropped ALU support for it for 64-bit mode.

The x-86-64 FPU (x87-64?) still supports conversion of double
precision floats to/from a 10 byte, 18 digit packed BCD storage
format. Unfortunately, I believe it would be fairly difficult to
handle larger values incrementally with the FPU.

George
From: Pascal J. Bourguignon on
tar(a)sevak.isi.edu (Thomas A. Russ) writes:

> I've often wondered if something like BCD would make a come-back.
> Particularly if you developed hardware support for computations in a
> base-10 representation, you should be able to get reasonable speed and
> avoid the "impedance-mismatch" between the users and the computer.

In any case, more than the base of the mantissa, it's the base of the
exponent that matters. You would get better results with floating
point numbers [n|e] representing:

n*10^e

instead of:

n*2^e

even if n was a binary integer.


(And notice that whether n is represented in binary or base ten
doesn't change the fact that 1/3 is not representable exactly).

--
__Pascal Bourguignon__ http://www.informatimago.com/
From: Raymond Toy on
On 5/27/10 3:56 PM, Pascal J. Bourguignon wrote:
> tar(a)sevak.isi.edu (Thomas A. Russ) writes:
>
>> I've often wondered if something like BCD would make a come-back.
>> Particularly if you developed hardware support for computations in a
>> base-10 representation, you should be able to get reasonable speed and
>> avoid the "impedance-mismatch" between the users and the computer.

FWIW IEEE754-2008 defines a decimal floating point format.

See, for example, http://en.wikipedia.org/wiki/IEEE_754-2008


>
> In any case, more than the base of the mantissa, it's the base of the
> exponent that matters. You would get better results with floating
> point numbers [n|e] representing:
>
> n*10^e

I don't know if IEEE754 solves this problem or not, but when the base is
not 2 and the mantissa is represented in a different base, there was
significant loss of precision. This was a problem with the base 16
floating point format used on old IBM and DEC (?) machines.

Ray
From: Barry Margolin on
In article
<98d42a9d-c4bc-4aa9-b35f-63c6b7913b34(a)z17g2000vbd.googlegroups.com>,
Vend <vend82(a)virgilio.it> wrote:

> On 26 Mag, 08:58, Barry Margolin <bar...(a)alum.mit.edu> wrote:
>
> > Floating point was designed for efficiency, not precision.
>
> I don't think this is correct. Efficiency is useless if you don't
> deliver a correct result, and in settings where approximate quantities
> and approximate computations are involved, a correct result requires
> bounded errors.

But achieving that is expensive. So you trade off some degree of
correctness for efficiency.

If you want to bound the errors some more, you use double precision.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Antony on
Thomas A. Russ wrote:
> Actually, arbitrary precision wouldn't really be needed to address most
> concerns. The general complaint seems to stem from the fact that there
> is a mismatch between human (base 10) and computer (base 2) number
> systems. If we worked with an internal base 10 representation, then you
> would really avoid most of the problems.
Since I saw a couple of posts with pointers to the Goldberg stuff, I now
feel comfortable pointing to
http://speleotrove.com/decimal/

Side note -
Just googling
decimal arithmetic
gets this info as the first hit, but it used to be under some ibm owned
site. I guess all big companies feel an urge to get rid of anything
technical.

-Antony
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: lisp port
Next: Disjoint sets