You can find out a special case and select the value you want to return.
The values โโof interest are as follows:
When values โโhave the same sign and exponent and only differ in the mantissa.
When the values โโhave the same sign, the exponents differ by one, and a unit with a large exponent has a mantissa of 0, and the other mantissa is filled with units.
In fact, if you use IEEE-754 numbers (which you probably are), you can run both tests at once (after checking things like Zero, Inf and Nan):
if ( repr1 + 1 == repr2
|| repr2 + 1 == repr1)
....
, , - , .
, , . , , , , , . , .