In NetCDF-Java and THREDDS, we currently use Double.valueOf (or similar) to parse strings as floats. As the Javadoc states, only the literal string "NaN" is interpreted as Not-a-Number and only the literal string "Infinity" is interpreted as infinity. We ought to be more lenient. At the least, do case-insensitive matching and accept the "inf" string.
From the mailing list:
In NetCDF-Java and THREDDS, we currently use Double.valueOf (or similar) to parse strings as floats. As the Javadoc states, only the literal string
"NaN"
is interpreted as Not-a-Number and only the literal string"Infinity"
is interpreted as infinity. We ought to be more lenient. At the least, do case-insensitive matching and accept the"inf"
string.