l_fp, time, calendar
Achim Gratz
Stromeko at nexgo.de
Sat Mar 25 14:27:09 UTC 2017
Hal Murray writes:
> We should probably invent something like a timespec so we keep all the low
> order bits. If I'm counting right, there are 53 bits of fraction in a
> double. With 32 for seconds, that leaves only 21 for fraction. That's 1/2
> microsecond.
There should be no need to convert an l_fp timestamp into a double
anywhere you need the full precision of the whole + fractional part. If
there is, then the whole seconds need to be split before you do whatever
needs doing. For time offsets the conversion is OK as long as the
values stay within about +-528.5h, which is one of those assumptions
that live in the code, but are nowhere checked. I can't think of any
occurence where the loss of precision for larger offsets would make a
difference, though.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
More information about the devel
mailing list