Is binary equality comparison of floats correct? : <p>I'm working on different memory block manipulation functions and during benchmarks I noticed, that my implementation of the <code>IsEqualRange(double* begin1, double* end1, double* begin2, double* end2)</code> is much faster then the <code>std::equals(...)</code> on MSVC and GCC as well. Further investigation showed, that doubles and floats are not block compared by <code>memcmp</code>, but in a for loop one by one. </p>

<p>In what situation does binary comparison of floats lead to incorrect result? When is it ok to binary compare (equality) array of floats/doubles? Are there other fundamental types where I shouldn't use <code>memcmp</code>?</p>
