> > Prelude> 1.0 - 0.8 - 0.2
> > -1.49012e-08
> Since the Paleozoic Era Hugs is distributed with HAS_DOUBLE_PRECISION
> desactivated (can some gurus explain why?...), and the first thing
> I do with, is its recompilation. Such nasties as above become then less
> dangerous.
"less dangerous" ... perhaps I should add a rider that I don't quote
this example because it is a fault with single vs double precision,
a mistake in Hugs, or indeed a problem at all. It's just
interesting to see how our perception of real numbers can clash with
the (entirely sensible) mechanics of floating-point arithmetic.
--------------------------------------------------------------------
Ian Stark http://www.dcs.ed.ac.uk/home/stark
LFCS, Division of Informatics, The University of Edinburgh, Scotland