<p>Or is there a chance that the operation will fail?</p>

<p>Thanks.</p>

<p>I chose the wrong term and what I really meant was rounding to 0, not truncation.</p>

<p>The point is, I need to compare the integer part of two doubles and I'm just casting them to int and then using ==, but, as someone pointed out in one of my earlier questions, this could throw an overflow exception if the double can't fit into the integer.</p>

<p>So the question would be 'Is it correct to use the == operator to compare two doubles that have previously been rounded to 0, or should I stick to the casting to int method and catch a possible exception?</p>

It can still fail due to the normal problems with floating point representation.  Rather than truncating them, use a delta that would represent the equivalent precision.
It can fail in cases where you have two floats that you would normally consider the same,
10.19999999
10.20000001
but when you truncate them they give different results.
10.19
10.20
Whereas, if I had used a delta of 0.001 to compare to the difference, I would have seen that these two values are effectively the same.