From: fred Date: Tue, 10 Dec 1996 00:51:47 +0000 (+0000) Subject: lilypond-0.0.15 X-Git-Tag: release/1.5.59~6635 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=18d1d20814dc58b807db6ff4de65284d06157f24;p=lilypond.git lilypond-0.0.15 --- diff --git a/src/misc.cc b/src/misc.cc index 54746fd836..51baac1211 100644 --- a/src/misc.cc +++ b/src/misc.cc @@ -3,12 +3,19 @@ #include -int intlog2(int d) { +int +intlog2(int d) { int i=0; while (!(d&1)) { - d/= 2; i++; + d/= 2; + i++; } assert(!(d/2)); return i; } +double +log2(double x) { + return log(x) /log(2.0); +} +