Microsoft uses the IEEE floating point specifications. This limits 64 bit floating point numbers to 53 bit mantissas. A simple example is to convert the decimal number 0.2 to 64-bit floating point and then back again to decimal.
(d) 0.2 = (b) 0.00110011001100110011001100110011001100110011001100110
Reversing this:
(b) 0.00110011001100110011001100110011001100110011001100110 = (d) 0.1999999999999999555910790149937383830547332763671875
If a transformation is scaled or rotated, etc., the inverse will likely not be equal to the original. Ruby docs indicate 15 or 16 digits of precision … 14 seems to be a safe bet. Maybe you could round + truncate the numbers before comparison?
While binary integers play nicely with decimals, binary fractions are not so friendly. There are some exceptions of course … (d) 0.5 = (b) 0.1 and (d) 0.25 = (b) 0.01 and (d) 0.75 = (b) 0.11 etc.