[PD] Negative input numbers for [pow] return 0

Joe White white.joe4 at gmail.com
Wed Apr 24 11:26:42 CEST 2013


>
> It may be a bit more complex since exponent values between -1 and 1 are the
> ones that generate imaginary numbers from negative values, with the
> exception of 0 which generates 1. Latest pd-l2ork patch tries to fix this.
> See:
>
> https://github.com/pd-l2ork/pd/commit/95d82d33d2580a00e32d725e0f5147d88cdaf3


I think Ivica's proposal is a great solution. Still output 0 for any NaNs
but report it to the user so they are aware.

On 24 April 2013 09:50, IOhannes m zmoelnig <zmoelnig at iem.at> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 2013-04-24 04:10, Ivica Ico Bukvic wrote:
> > It may be a bit more complex since exponent values between -1 and
> > 1 are the ones that generate imaginary numbers from negative
> > values,
>
> we call those NaNs.
>
> "the implementation would be trivial" implied "if you are ready to
> deal with NaNs".
>
> On 2013-04-24 05:15, Ivica Ico Bukvic wrote:
> >
> > Yes, the proposed patch generates 0 when imaginary numbers are
> > involved and issues warning on the console with ability to track
> > the error.
>
> in which the original behaviour is probably "better", as the result
> won't start jumping widely between real values and zero.
>
>
> it seems like i have somehow turned into a defender of the current
> behaviour of [pow].
> i'd rather not (that is: personally i'd rather not have too many
> constructs built into Pd that seemingly make life easier and protect
> people from doing stupid things)
>
>
>
> rtfgmqawe
> IOhannes
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlF3nNYACgkQkX2Xpv6ydvRlTACePiG5HlLocgfVXtKa/cursSDJ
> vwoAnA0vk+WEYN0iDjD1amwaPFciJzRn
> =DfXc
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>



-- 
Follow me on Twitter @diplojocus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130424/c4cbc308/attachment-0001.htm>


More information about the Pd-list mailing list