Multiplying and dividing by the same stuff seems to alter the value. Quite curiously, if the value you start from is large enough (greater than 0.05 in my case) you do not see the problem. Any idea why?
MemberQ[{0.01, 0.05}, (0.05*9*2)/9/2]returnsTrueMemberQ[{0.01, 0.05}, (0.01*9*2)/9/2]returnsFalse
I can fix this using chop, but sounds like a stupid way of doing it
MemberQ[Chop[{0.01, 0.05} - (0.05*9*2)/9/2], 0]returnsTrueMemberQ[Chop[{0.01, 0.05} - (0.01*9*2)/9/2], 0]returnsTrue
Any ideas for a better way?


MemberQ[Rationalize[{0.01, 0.05}], Rationalize[(0.01*9*2)/9/2]]– bill s Oct 16 '17 at 22:26==and even===(!) use a tolerance in Mathematica. But functions likeMemberQ,Union, etc. do not, at least not for machine precision numbers. I haven't tried with arbitrary precision ones. – Szabolcs Oct 16 '17 at 22:31MemberQusesMatchQrather thanEqualorSameQ. – Oct 16 '17 at 23:02