Paul LeoNerd Evans leonerd at
Tue Jan 16 22:16:19 GMT 2007

On Mon, 15 Jan 2007 17:43:14 +0000
Andy Armstrong <andy at> wrote:

> On 15 Jan 2007, at 17:14, Peter Hickman wrote:
> > For the sake of argument X is imprecise and 0 is precise. Just how  
> > many such cases exist for the various operations I do not know. But  
> > doing this in software is not going to be cheap. Quite what you  
> > would gain in knowing that a number was imprecise I do not know,  
> > but them I'm a web developer :) not an accountant.
> And PI * anything-other-than-zero is always going to be a big old  
> result if you want to capture all of the bits :)

If you want to do this sort of thing properly, you keep it symbolic and
abstract within the logic, and only try to convert it to decimal when you
print it. That way, if you want to print, say, 10 decimal places
accurately, you lazily evaluate with however many digits were needed in
the first place to guarantee that.

Paul "LeoNerd" Evans

leonerd at
ICQ# 4135350       |  Registered Linux# 179460

More information about the mailing list