support NaN, NA, Inf, -Inf in new_double, new_integer, new_logical, new_character