Added NaN, +Inf, -Inf and minor fixes