Normalize nan generation.