[clean-list] Clean 'takeWhile' inconsistency?
Arjen van Weelden
A.vanWeelden@cs.ru.nl
Wed Sep 15 13:26:22 MEST 2004
Hi,
This has nothing to do with takeWhile, it is caused by the test for
equality (<>) on Reals (80bit floating point register calculations vs.
64bit floating point memory stores). Please see:
http://www.cs.kun.nl/pipermail/clean-list/2001/001639.html
regards,
Arjen
Adrian Victor Crisciu wrote:
> Hi,
>
> Trying a small exercise from chapter 2 of the Clean Book, I stumbled upon
> a curious problem. Running the following program yelds True, while I
> believe it should yeld False, due to the definition of 'takeWhile':
>
> module cap2
> import StdEnv
>
> Start = last (takeWhile ((<>) 0.0) (iterate reduce 1.0)) / 10.0 <> 0.0
> where
> reduce x = x/10.0
>
> Am I wrong, or this an inconsistency in the definiton of one of the
> functions involved.
>
> I use Clean 2.1 on a Linux box based on glibc-2.3.1
>
> Thanks!
>
> Adrian Crisciu
>
>
> _______________________________________________
> clean-list mailing list
> clean-list@cs.kun.nl
> http://www.cs.kun.nl/mailman/listinfo/clean-list
More information about the clean-list
mailing list