[LEAPSECS] [time-nuts] Leap Quirks

Magnus Danielson magnus at rubidium.dyndns.org
Mon Jan 5 09:11:00 EST 2009


Rob,

Rob Seaman skrev:

> Magnus Danielson wrote:

>

>> time_t = d*86400 + h*3600 + m*60 + s

>

> Just thought I'd note an alternate interpretation. In NOAO's widely

> distributed image processing system (IRAF) a sexagesimal number is a

> double precision floating point number, not an integer:

>

> 12:34:56 = 12 + 34/60 + 56.0/3600

>

> Wherever a float can appear, a sexagesimal string is permitted. Our

> version of printf includes %h and %H for turning a binary float back

> into dd:mm:ss.s or hh:mm:ss.s.

>

> A particular application may need to count integer seconds (as in our

> own date and time library, perhaps), but the need is remarkably

> infrequent. For the vast majority of cases sexagesimal numbers behave

> like floats.


Hate to nitpick you, but that is a different representation, not a
different interpretation.

The floating point number is thus in hours, is that more practical than
say days?

Cheers,
Magnus


More information about the LEAPSECS mailing list