Mark Reid wrote:
> Is this a bug or a "feature"? :)
It's neither. It's a property of floating point numbers.
Since no(?) hardware uses base 10 for floating point
decimals will not be represented exactly.
> ---
>
> % hugs
> [[snipped intro]]
>
> Prelude> [1.0,0.9..(-1.0)]
> [1.0, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.0999998, -2.38419e-07,
> -0.1, -0.2, -0.3, -0.4, -0.5, -0.6, -0.7, -0.8, -0.9]
> Prelude>
--
-- Lennart
- List generation bug in Hugs1.4 and Hugs98 Mark Reid
- RE: List generation bug in Hugs1.4 and Hugs98 Mark P Jones
- RE: List generation bug in Hugs1.4 and Hugs98 Lennart Augustsson
- RE: List generation bug in Hugs1.4 and Hugs98 Christian Sievers
- RE: List generation bug in Hugs1.4 and Hugs98 Mark P Jones
- RE: List generation bug in Hugs1.4 and Hugs98 Christian Sievers
