Perhaps a Very Small Bug

Iain McNaughton im@t956379207.demon.co.uk
Thu, 28 Jun 2001 14:57:48 +0100


Hi !

This is just to report something which surprised me, and which may
perhaps be a very small bug ( or possibly just me being dumb ).

I was using WinHugs as a calculator. From the main command prompt in
WinHugs, I typed the following:

 102.0*201.0 + 103.0*202.0 + 102.0*201.0 +102.0*202.0 + 102.5*200.5 

I then hit 'return', and was presented with the answer:

 102965.0

Now, the actual answer is 102965.25, as Hugs itself knows; when I typed:

 $$ - 102965

and hit 'return', I duly got the answer:

 0.25

I tinkered around with a few other numbers, and what seems to be
happening is that Hugs is rounding the calculation result up or down, in
the way that you'd expect if you were only showing a specific number of
significant figures. This seems reasonable ( although only 6 significant
figures seems a bit on the low side ), but it's rather misleading to
then show the '0' after the decimal point ! I'd be interested to hear
your comments.

Thanks for your ( hoped for ) advice on this.

Yours sincerely,

Iain McNaughton.



-- 
Iain McNaughton