Excerpts from fons's message of 2011-01-28 16:11:52 +0100:
Took me a while to figure out that libm is part of glibc :)
Good to know that those functions are available on probably pretty much
all linux systems.
> > The next obvious question is: Does the inaccuracy reliably result in
log2() suffers from the same problem? I somewhat dislike the idea of
adding a constant.
Neat. I thought about it myself yesterday but my ideas weren't exactly
brilliant. One idea was to divide by 2, the other to use a small
lookup table for powers of 2. I don't really know about efficiency, but
I guess bit shifting is as efficient as it gets?
Anyway, it's a neat way to avoid the problem and the rounding properties
of mult/div in case of not power of 2 could be useful as well.
Linux-audio-user mailing list