Christian Smith wrote: > If you use the julianday representation, the integer component is the > number of days since "noon in Greenwich on November 24, 4714 B.C", with > the fractional part being the fraction of that day. Hence, the > resolution is determined by the fractional component of the real number. > Now, in the UK, I get the following: > sqlite> select julianday('now'); > 2454295.1407767 > > The integer component consumes probably 21 bits of the available 52 bits > mantissa of an IEEE-754 64-bit real. That leaves 31 bits for the > fractions of a day, giving a resolution of 1/24855 of a second: > 2^31/(60*60*24) = 24855.134814814814814814814814815 > > Plenty enough for milli-second resolution. > > Probably not very good for embedded applications if an FPU is not > available.
I'm a little confused by the math... help me work this out. sqlite> SELECT julianday('now'); 2454295.20404931 That gives me days since the Julian epoch. If I multiply by 86400 I should get seconds since the Julian epoch. sqlite> SELECT julianday('now') * 86400; 212051105903.613 That leaves me three decimal points of precision for seconds. So that's thousandths of a second? Where do you get 24000ths of a second? -- Scott Baker - Canby Telcom RHCE - System Administrator - 503.266.8253 ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------