On 8/28/06, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> The change I wrote for the parser shows how
> 4.5 and 4.50 could be distinguished because the second one has
> higher precision; convert them to bigfloats with fpprec 2 and 3,
> respectively.
Yes, we could certainly do that. But bigfloat doesn't do the expected
thing here, namely to give results with the *smallest* number of
significant digits in the result. Not that that's a marvelous way of
doing significance (as you've pointed out before).
> Distinguishing 9/2 from 45/10 would be problematical. I assume
> you are not making that case.
No, don't worry! It's just that 4.5 formally represents 45 * 10^-1 = 45/10.
> Distinguishing 4.5 from 9/2 on the basis that 4.5 is a different type is OK.
> Computing 9/2 -4.5 must then be defined in some useful fashion, and that
> is problematical. 0? 0.e0? [-0.05,0.05]?
Well, if 4.5 "really means" the interval [4.45,4.55], then the answer
is clear. It is as you say [-0.05,0.05], which could well be
represented externally as 0.0. But of course we don't currently
support intervals in any sort of integrated way....
-s