Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] mtime preservation
Date: Thu, 26 Nov 2009 15:21:52
Message-Id: 20091126152119.5add6d2d@snowcone
In Reply to: Re: [gentoo-dev] mtime preservation by Zac Medico
1 On Wed, 25 Nov 2009 16:49:17 -0800
2 Zac Medico <zmedico@g.o> wrote:
3 > > Not non-preservation. Partial and inconsistent corruption.
4 >
5 > Wouldn't "loss of precision" be a more accurate description? Of the
6 > known packages which require timestamp preservation, do any of them
7 > use sub-second precision in their timestamp comparisons?
8
9 No. When you're dealing with decimals, floating point rounding isn't a
10 simple truncation:
11
12 >>> 1234567890.999999999
13 1234567891.0
14
15 nor is it a rounding:
16
17 >>> 1234567890.111111111
18 1234567890.1111112
19
20 The former is particularly bad, since POSIX deals with legacy functions
21 by ignoring the nanosecond part, not by rounding it.
22
23 --
24 Ciaran McCreesh

Attachments

File name MIME type
signature.asc application/pgp-signature