Calculating ULP distance between two floating point numbers (quickly)

Either use reinterpret to convert your floats to integers and extract the bit patterns from that or rescale the output of significand or frexp.