support writing NaN, Infinity, -Infinity