Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] PEP 410 (Decimal timestamp): the implementation is ready for a review

Antoine Pitrousolipsis at pitrou.net
Thu Feb 16 14:26:39 CET 2012


Le jeudi 16 février 2012 à 14:20 +0100, Victor Stinner a écrit :> > If I run your snippet and inspect modification times using `stat`, the> > difference is much smaller (around 10 ns, not 1 ms):> >> > $ stat test | \grep Modify> > Modify: 2012-02-16 13:51:25.643597139 +0100> > $ stat test2 | \grep Modify> > Modify: 2012-02-16 13:51:25.643597126 +0100>> The loss of precision is not constant: it depends on the timestamp value.Well, I've tried several times and I can't reproduce a 1 ms difference.> The loss of precision is between 1 ms and 4 us.It still looks fishy to me. IEEE doubles have a 52-bit mantissa. Sincethe integral part of a timestamp takes 32 bits or less, there are still20 bits left for the fractional part: which allows for at least a 1 µsprecision (2**20 ~= 10**6). A 1 ms precision loss looks like a bug.RegardsAntoine.


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp