40
SECTION 5. DATA REPRESENTATION
5.2.4
Sixty-four-bit
Sixty-four-bit integers shall be two's complement signed binary integers, contained
in eight bytes with decimal values ranging from -9223372036854775808 to
+9223372036854775807.
5.2.5
Unsigned Integers
The FITS format does not support a native unsigned integer data type (except for the
unsigned 8-bit byte data type) therefore unsigned 16-bit, 32-bit, or 64-bit binary integers
cannot be stored directly in a FITS data array. Instead, the appropriate offset must be
applied to the unsigned integer to shift the value into the range of the corresponding
signed integer, which is then stored in the FITS file. The BZERO keyword shall record
the amount of the offset needed to restore the original unsigned value. The BSCALE
keyword shall have the default value of 1.0 in this case, and the appropriate BZERO
value, as a function of BITPIX, is specified in Table 4.9.
This same technique must be used when storing unsigned integers in a binary table
column of signed integers (§7.3.2). In this case the TSCALn keyword (analogous to
BSCALE) shall have the default value of 1.0, and the appropriate TZEROn value (analogous
to BZERO) is specified in Table 7.7.
5.3
IEEE-754 Floating-Point
Transmission of 32- and 64-bit floating-point data within the FITS format shall use
the ANSI/IEEE-754 standard [21]. BITPIX = -32 and BITPIX = -64 signify 32- and
64-bit IEEE floating-point numbers, respectively; the absolute value of BITPIX is used
for computing the sizes of data structures. The full IEEE set of number forms is allowed
for FITS interchange, including all special values.
The BLANK keyword should not be used when BITPIX = -32 or -64; rather, the
IEEE NaN should be used to represent an undefined value. Use of the BSCALE and
BZERO keywords is not recommended.
Appendix E has additional details on the IEEE format.
FITS Standard