I suspect that the reason you think you want this, is because you're getting comparison errors from artifacts in the double precision math.
Numbers that should be mathematically equivalent according to the formulas they were produced from, are not equivalent in practice.
Stripping bits is a shortcut that won't solve the problem. It'll introduce it's own errors.
Applying error ranges to your operations, is the only reliable way to make this work.
Take a look at this function to see how it's done.
bool AlmostEqualDoubles2(double nVal1, double nVal2, double nEpsilon)
{
bool bRet = (((nVal2 - nEpsilon) < nVal1) && (nVal1 < (nVal2 + nEpsilon)));
return bRet;
}
Reliable Floating Point Equality Comparison[
^]
Or possibly..
#define AlmostEqualDoubles2(nVal1, nVal2, nEpsilon) \
((((nVal2) - (nEpsilon)) < (nVal1)) && ((nVal1) < ((nVal2) + (nEpsilon))));