Since comparing float
s is evil then if I have a container of float
s and I sort it using some standard library sorting algorithm like std::sort
then how does the algorithm sort them?
std::vector<float> vf{2.4f, 1.05f, 1.05f, 2.39f};
std::sort( vf.begin(), vf.end() );

So does the algorithm compare
1.05f
and1.05f
? 
Does it internally uses something like:
std::fabs( 1.05f  1.05f ) < 0.1;
? 
Does this apply too to containers of
double
s? Thank you!
Source: Windows Questions C++