Assuming IEEE-754(and probably most floating point representations), this is true as it 0.0appears accurately in all formats IEEE-754.
Now, if we take another literal that does not appear exactly in binary formats IEEE-754, for example 0.1:
double d = 0.1;
bool b = (d == 0.1);
This can lead to a value falsein the object b!
, , double d .
(C99, 5.2.4.2.2p8) " ( ), , , , , ."