[PD] higher math

Mathieu Bouchard matju at artengine.ca
Thu Sep 10 16:56:48 CEST 2009


On Tue, 8 Sep 2009, Hans Roels wrote:

> I noticed some strange behaviour of some higher math objects in Pd 
> vanilla (0.42-4): 'log~' has a right inlet

log(a,b) = log(a)/log(b)

it's dumb, because when a two-input log is computed, it takes the time of
two one-input logs plus the time of a division... which is normal and
useful, but the problem is that you can't make it compute any faster. e.g.
you could precompute log(b), or you could even precompute 1/log(b) because
nowadays it's faster to multiply than to divide, but those accelerations
would need the existence of a one-input log. You don't find this in Pd's
internals. You find this as [expr~ log($v1)].

> file a 'optional creation argument initializes right inlet (the base of 
> the logarithm)' but this doesn't work. If I create a 'log~ 10' object it 
> still computes the logarithm base e

I tried it with 0.42-5 and it worked.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801


More information about the Pd-list mailing list