lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Jun 14, 2005 at 11:55:39PM -0500, Rici Lake wrote:
> On 14-Jun-05, at 7:19 PM, Chris Marrin wrote:
> >I have gotten recent experience with QueryPerformanceCounter(). I 
> 
> I find this a bit puzzling. A double has 53 bits of precision. A day 
> has 86400 seconds; log2 of 86400*3e9 is 47.88; in other words, a double 
> can accurately represent a number of 3GHz ticks up to a bit over 34 
> days. After that, it should lose one bit of precision, which should be 
> barely noticeable. In a year, you would lose less than four bits of 
> precision. If you are reduced to a precision of 100ms, you are losing 
> something like 28 bits of precision. This suggests that you were doing 
> arithmetic with floats rather than doubles; floats have 24 bits of 
> precision, or 29 less than doubles, which would work out to about the 
> loss you are reporting.

Just to toss this out:

  http://www.virtualdub.org/blog/pivot/entry.php?id=53

Are you using D3D, or something else that plays with the FPUCW?

-- 
Glenn Maynard