Approximate equality stolen/adapted from Patrick O. Perry's (patperry) ieee754.