Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why use cosine to interpolate v.s. a linear smear?


The cosine is pretty much the perfect interpolation function when you want the derivatives to be zero at the boundaries. It's by definition frequency-bound (to itself, of course). It's derivatives are defined and continuous to any degree you want. And it's easy to express and understand. You pick other functions only when it's too expensive.


Probably to minimise the error inbetween updates. If the clock rate changes suddenly, then after that moment, any clocks based on the old rate will become increasingly wrong. but, if the skew starts off slow, begins to change rapidly, and then slows and stops again, then clients won't need to be immediately aware of the clock skew and will be less wrong.


Very good question.

I can only think it's too randomize it a little so you don't end up changing clocks only by powers of 2 and showing up some weird bug.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: