Recognize nan and inf in floating-point formats.