Original Post
Would this be a good way to compare two floats ?
Just figured it out so I haven''t check it yet myself. I will but have to go and shop me some food before the stores close.
bool equal(float a, float b)
{
int m;
m = mantissa(a);
m += 128;
m &= 0xFFFF00;
mantissa(a) = m;
exp(a) += mantissa_carry(m);
m = mantissa(b);
m += 128;
m &= 0xFFFF00;
mantissa(b) = m;
exp(b) += mantissa_carry(m);
return a == b;
}