# MemberQ not working? [duplicate]

I'm confused by the following trivial code:

{Range[0, 1, .1][[8]]} === {.7}


gives True

MemberQ[{.7}, .7]


gives True, but

MemberQ[{Range[0, 1, .1][[8]]}, .7]


gives False. Huh? What am I missing?

## marked as duplicate by m_goldberg, MarcoB, Alexey Popkov, Kuba♦Aug 7 '17 at 8:31

• {Range[0, 1, .1][[8]], .7} // InputForm ought to be enlightening. Moral lesson is that you don't do such pattern matches on inexact numbers. – J. M. will be back soon Aug 6 '17 at 12:53
• That would be due to Internal$SameQTolerance (or Internal$EqualTolerance if you had used ==). See e.g. this. – J. M. will be back soon Aug 6 '17 at 12:59