Yousry Abdallah <[EMAIL PROTECTED]> writes:
Try the following expression:
? 0.4 > 1.0 - 0.6
True
This isn't really a bug - it simply reflects the fact that floating
point calculations are approximate. If you are using floating point
(in any language), you really ought to be writing things like:
if (0.4 + eta > 1.0 - 0.6) ...
where eta is chosen to suit the accuracy of your calculation on the
floating point hardware available.
That said, compiling Hugs to use double precision floating point would
avoid this particular problem. To enable double precision, you need
to set the value of "USE_DOUBLE_PRECISION" to "1" in options.in after
configuring Hugs. (Or change it in options.h.in before
configuration). If you use this option, you will _not_ be able to use
the Xlib or Win32 libraries. (There used to be a configuration option
to enable double precision but I removed it because it was getting too
complicated to describe which options were incompatible with other
options).
--
Alastair Reid Yale Haskell Project Hacker
[EMAIL PROTECTED] http://WWW.CS.Yale.EDU/homes/reid-alastair/