<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2018-05-08 23:18 GMT-03:00 Martin Peach <span dir="ltr"><<a href="mailto:chakekatzil@gmail.com" target="_blank">chakekatzil@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I think pow(-1, 0.5) should give a 'NaN' instead of 0 if we're sticking to Real numbers.</div></div></div></div></blockquote><div><br></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I don't mind the nan/inf output either, but it's not up to me... I'm just guessing there's such a concern in avoiding them, as with [log]/[log~], or even when you do [/ 0]! The fact is that Pd internal math objects have this thing already, you know, and it's not like preventing negative numbers was some accident, it was quite intentional, so I'm trying to meet half way instead of just proposing we should change everything and just deal with nan/inf. </span><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> 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?<br></div></div></div></div></blockquote><div><br></div><div>It doesn't work, I tried with [expr pow(-1, 0.5)], which generates nan in this case... by the way, I guess if people care about nans, then they can just adopt the expr version. The expr object, while we're at it, allows you to check if a number is a nan or inf with the isnan($f1) / isinf($f1) functions - then you can feed it to a select object. So you have this situation already in Pd with expr that better deals with this kind of math already, which is a poin that maybe we shouldn't mess too much with [pow]/[pow~] apart from letting them compute negative numbers that make sense.</div></div></div></div>