On Thu, 2009-02-26 at 11:23 +0100, Michael Käppler wrote:
> Hi all,
> I don't completely understand the way how Duration::Duration(Rational r, 
> bool scale) converts a rational number into a note and dots, but
> it's clear that the Completion_heads issue with splitting up breve and 
> longa notes was caused by the way << behaves when given a negative 
> number as shift-amount. I've tested this and it works perfectly for me. 
> I'm a little unsure if this approach works when k gets so low that the 
> rightest non-zero bit is shifted out into the nirvana... But for this 
> moment I can't imagine cases where this could happen.

Can't happen, AFAICT: by the definition of k, k >= -intlog2(p) and so
-k <= intlog2(p) <= log2(p). Therefore 2^{-k} <= p and so (p >> -k) ==
p*2^k >= 1. That is, you never shift everything away.

Joe




_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to