[PD] pow/pow~ and negative input, a fix proposal

Martin Peach chakekatzil at gmail.com
Wed May 9 20:15:10 CEST 2018


On Wed, May 9, 2018 at 1:13 PM, Alexandre Torres Porres <porres at gmail.com>
wrote:

>
> 2018-05-09 13:53 GMT-03:00 Martin Peach <chakekatzil at gmail.com>:
>
>>
>>> I just tried this in Max6:
>> [pow 2] with a negative input gives a correct positive result.
>> [pow 0.5] with negative input sets a floatnumberbox to 'nan',
>>
>
> yeah, but try it with [pow~] in max, you'll see that it will filter it out
> and make it output "0", in the same way I was telling you about the other
> signal objects that can generate inf/nan (I gave the example of atanh~).
> Currently, it seems only signal bitwise operator objects in max can
> potentially create inf/nan, and they have a [bitsafe~] object to deal with
> that (one which we also cloned for cyclone).
>

It makes sense for signal objects to give zero, to avoid giant spikes in
the audio, but control objects are not only used for audio, they ought to
give something more truthful, maybe just post an error message to the
console if there is no trapping mechanism that can be constructed in a
patch.


>
>
>> but [print]s the value '-1.#IND00'.
>>
>
> are you on windows?
>

Yes. What does max print on a Mac?

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180509/1dd846ef/attachment.html>


More information about the Pd-list mailing list