. , 1970-01-01. , (1970-01-01) . ... vadj = float(hi32 - fudge) + lo32 / 2.0 ** 32
max (hi32) min (lo32) , 6 ( (?)), 19 hi32-fudge. 19 + 32 - 51 - IIRC Python.
, , .
: @unwind :
>>> a = 0x00000001/4294967296.0 + 0x4ca1f350
>>> b = 0x00000002/4294967296.0 + 0x4ca1f350
>>> b - a
0.0
>>>
2: , str(), repr(), timestamp_from_str()? , . - :
>>> class TS64(object):
... def __init__(self, hi, lo):
... self.hi = hi
... self.lo = lo
... def float_delta(self, other):
... hi_delta = self.hi - other.hi
...
... return hi_delta + (self.lo - other.lo) / 4294967296.0
...
>>> a = TS64(0x4ca1f350, 1)
>>> b = TS64(0x4ca1f350, 2)
>>> b.float_delta(a)
2.3283064365386963e-10
>>> repr(_)
'2.3283064365386963e-10'
>>>
" ": 6 , (/2 ** 32)??? , float(difference(ts1, ts2)) float(ts1) - float(ts2), .
3: /
, :
, "" , , , - ( , 29 32 ) "". URL- .
1000000000 (10**9) . , math.log(10**9, 2) ( 29.897352853986263 , .. 30) , 29. , .
, : 32 , 29 30 3 2 ?
Secondly, one could count nanoseconds by seconds, dividing by 10**9. However, your expression in your question "" number 4ca1f350 9481ef80 translates to 1285682000.580107659 "" corresponds to the division by 2**32. In fact, 0x9481ef80 is 2,491,543,424, which is more than double 10**9. Please explain. What is the source of the expression "translates to"? Do you have other examples?