Skip to content
Prev 59649 / 398502 Next

timeDate

james> You might want to check out 'chron'.  This stores the
    james> time as days and fractions of a day.

    james> If you take the current date,

    >>> as.numeric(chron(dates.="11/23/2004"))
    james> [1] 12745
    >>> 

    james> you get the value above.  If you change this to
    james> millisecond, you get

    >>> as.numeric(chron(dates.="11/23/2004")) * 86400 * 1000
    james> [1] 1.101168e+12
    >>> 

    james> this value requires 46 bits and since a floating
    james> point number has 54 bits of value, 

    MM> no, only 52 bits  (64 = 52+1+12+1) with sign bits for exponent
    MM> and mantissa.

so much on the theme of mathematicians and arithmetic !
   64 = 52 + 1 + 10 + 1

Martin