Floating point NaN values as Keywords

Barry M. Schlesinger bschlesinger at nssdca.gsfc.nasa.gov
Wed Aug 13 09:36:00 EDT 1997


In article <33EF7781.1DC11185 at nrao.edu>, Bob Garwood <bgarwood at nrao.edu> writes...
>Just as it is useful to store NaN (not a number) values in
>binary tables to indicate an invalid number, it would be equally
>useful to have some convention for indicating a NaN as
>a keyword value.
> 
>FORTRAN-77 doesn't say anything about NaNs so this would
>appear to be not allowed.
> 
>Nevertheless, it would be useful.
> 
>The only alternative when a certain keyword is expected
>to be there is to invent a value that is a lie ...  or to not write
>that keyword ... 

>In the Single Dish FITS convention... 
>that has been firming
>up for years (often called the Green Bank convention, at least
>in part), columns in a binary table which have a constant
>value and which have a name with 8 characters or less can
>be represented as keywords (called virtual columns).
>Without the ability to write a NaN as a keyword, columns which
>are constant NaNs could not be made virtual in this convention.
> 
>...
> 
>   Pense's cfitsio library will write out "NaN" when given a
>keyword value that is a NaN, at least under Linux and Solaris.
> 
> 
>What does anyone else feel about NaN values and keywords?
> 

As NOST 100-1.1 puts it, "The value shall be the ASCII text
representation of a string or constant."   What is the ASCII
representation of a NaN? 

				Barry Schlesinger
				FITS Support Office
				GSFC/ADF





More information about the fitsbits mailing list