Don't try to format a double if it's NaN. Why we still have NaN is
unclear.