retracediff: Prevent math domain error when comparing float images.