BCD accuracy (was: HP 85/Rocky Mountain BASIC replacement)

From: ajp166 <ajp166_at_bellatlantic.net>
Date: Sat Apr 21 13:13:38 2001

From: Jim Battle <frustum_at_pacbell.net>
>clarifies the matter at hand. I claim that a floating point
representation
>specifies precision and has nothing to say about accuracy (other than
>accuracy is limited by precision).


Floating point binary is infamous for it's errors in that regard.

>To clarify, say a number is 175.136985. This represents my weight very
>precisely, but whether it is accurate or not is a different matter.


Ah but if you convert it to a 24bit floating point (more bits would help
but limiting it makes the error glaring) you may not be able to express
it
accurately enough. The BCD case induces more truncation limiting
precision.

>Again, I must be missing something, or perhaps it is a definitional
>thing. I've given my definition for precision (or what you call
>resolution) and accuracy. I claim accuracy is largely outside the scope
of
>a number representation. Perhaps you and others have a different
>definition than I do and are also internally consistent. I'd like to
hear
>it, since I keep running into it and don't understand it.


Accuracy express 1/3 binary and decimals for the same total bits.
Limit the case to something shorter than the usual 32 or 64 bits
say like 10 or 12 bits and you see the error. This is the gray zone
where
resolution, accuracy and range can collide. Of course with 128 bits of
either
case it's really meaningless then.

Back in the olden days (8080/z80/6502) when math was often limited in
the number of bits to something less than 32 bits this was more accutely
noticed by the users. The infamous MSbasic 3.99999=4 and other examples
come to mind. This led to things like NS* basic and HP using BCD to
avoid
the SQRT(16)=3.99999!

>If, on the other hand, you want to know what is sin(0.1), I claim the
>binary representation is more precise (and thus allows more accuracy;
>accuracy here depends on the implementation of the trig algorithms and
not
>inherently in the number system).


But the number of bits do make a difference.

>maybe I should give up and take this to the
alt.ieee.vs.bcd.floating-point
>newsgroup. :-)


Logically your correct but in the realm of older machines this was a real
issue.

Allison
Received on Sat Apr 21 2001 - 13:13:38 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:28 BST