Add support for NaN, Infinity, and -Infinity.