On Tue, May 8, 2018 at 9:28 PM, Alexandre Torres Porres porres@gmail.com wrote:
2018-05-08 18:05 GMT-03:00 Martin Peach chakekatzil@gmail.com:
On Tue, May 8, 2018 at 2:07 PM, Alexandre Torres Porres <porres@gmail.com
wrote:
... I personally cannot think of any use case where someone relies on pow(-1, 2) generating "0", it just seems wrong to me (i.e. a bug) and allowing it to do that wouldn't break things.
Maybe add another outlet for the imaginary part?
but simply pow(-1, 2) does not generate an imaginary part, right?
Right, sorry I was thinking of pow(-1, 0.5). pow(-1,2) should give 1.
Useful if you wanted to make a parabolic waveform in a table or something like that. And I think pow(-1, 0.5) should give a 'NaN' instead of 0 if we're sticking to Real numbers. I'm not sure if something like [select NaN Inf -Inf] works in Pd. It doesn't give any error on creation but how to generate the input? So ideally this:
[-1{ | [pow 0.5] | [sel NaN] | |
would emit a bang from the left outlet.
Martin