It is quite likely that your two vectors do not actually have exactly the same values, due tofloating point number precision. This has been explained in many forums and threads:
Because the number 0.1 cannot be representedexactly in typical floating point systems. It will be off in approximately the 16th decimal place, and so will not beexactly 10 after 100 times through this loop.
You need to include a tolerance, if you want to check equality of floating point numbers.
You can read more details if you search for these keywords, buthere is one good place.
Best Answer