Possible Duplicate:
Haskell ranges and floats
If I generate a list in ghci like so
let a = [0.1,1..10]
This gives me a list a with the following entries
[0.1,1.0,1.9,2.8,3.6999999999999997,4.6,5.5,6.4,7.300000000000001,8.200000000000001,9.100000000000001,10.000000000000002]
The last element of the list is 10.000000000000002, I assume this is just due to floating point use. However, comparing with the number 10 the result seems inconsistent, e.g,
last a > 10
True
last a < 10
False
Why is the list creation not comparing if the final element is less than or equal to the 10?