[fitsbits] 64-bit integers

William Pence pence at tetra.gsfc.nasa.gov
Fri Sep 21 15:17:11 EDT 2001


Steve Allen wrote:
> 
> How will the inclusion of 64-bit integers as a native type interact
> with TFORMn = 'P'?  This is the "Array Descriptor" type whose use
> appears to be intended much like that of a 64-bit pointer.
> 
> The usage of 'P' is not prescribed by the current standard.  Would it
> become irrelevant, or would the meaning suggested in the appendix
> still persist?
> 
> I'd like to see response from the authors of the BINTABLE paper on this.

I can't speak for the first 2 authors, but as 3rd author my response would
be that there is no direct connection between the 'P' data type and the
proposed new 'K' 64-bit integer data type. The '1P' datatype is defined in
the FITS Standard as an 'array descriptor' consisting of a pair of 32-bit
integers, equivalent to a '2J' column.  The proposed application of these 2
integers is described in Appendix B.1, where the first integer gives the
number of elements in the array, and the 2nd integer gives the zero-indexed
offset to the first element, measured from the end of the fixed size data
record.  This usage of the 'P' datatype has already been widely used in many
existing FITS files, so I would think that this usage would persist and at
some point would be moved from the appendix into the official document.

We might eventually need to consider adding a '1Q' data type, to represent
an array descriptor consisting of a pair of 64-bit integers to handle cases
where the heap is larger than 2^31 bytes long, but I'm not advocating that
we do this now.

And in reply to Arnold Rots' question:

> Sooo, what are you proposing: signed or unsigned ;-?

The proposed new data type would be 64-bit twos-complement signed binary
integers, contained in 8 bytes.

Bill Pence
-- 
____________________________________________________________________
Dr. William Pence                          pence at tetra.gsfc.nasa.gov
NASA/GSFC Code 662         HEASARC         +1-301-286-4599 (voice)     
Greenbelt MD 20771                         +1-301-286-1684 (fax)



More information about the fitsbits mailing list