06-14-2011 02:19 PM
altenbach wrote:You are throwing away a lot of data going from 128 to 32 bits. can't you store relative times in seconds directly as SGL instead? You'll have a 23 bit mantissa, which is a lot of seconds.
When disk space was at a premium and I used SGL precision I would define a new epoch for my dataset. Usually I would choose a memorable date, (one was April Fool's day) for the starting time.
Now that disk space is cheap, I don't worry about it, but we have passed a convenient time.
January 24, 1999 05:20:00.00 (UTC) corresponds to 3.0E+9 seconds using the LV epoch (January 1, 1904 00:00.00). You can store the time relative to this date and still easily convert to absolute time. U32 should be good for 130 or so years.
(Still think I'd simply cast the DBL seconds into two SGL and cram that into the rest of my SGL data.)