Add a test for correct NaN formatting