I'm using the Table command to generate a list of values:
FullForm /@ Table[10. - x, {x, 2.7, 2.8, .1}]
and I get the following result:
{7.3`,7.199999999999999`}
Why do I get 7.199999999999999' instead of 7.2?
Moreover, if I try to calculate the Complement of {7.2} in this list, I get {7.2,7.3}, which is not what I would expect. At the same time, using the Complement option SameTest->(#1==#2&) gets me {7.3}.
This behavior is observed in Mathematica 7/8/9, and even on WolframAlpha.
P.S. I know that using Range[7.3,7.2,-0.1] would be clearer, I'm just curious about the aforementioned problem.
http://mathematica.stackexchange.com/q/5580/3066 – m_goldberg May 19 '14 at 14:05
Tablebut rather with substraction. The question is why10.-(2.7+0.1)//FullFormand10.-2.8//FullFormproduce different results. – Ivan May 19 '14 at 14:18Out[8]//InputForm= 2.8000000000000003 `
– Daniel Lichtblau May 19 '14 at 14:37