[PD] expr "copysign" function doesn't seem to work

Alexandre Torres Porres porres at gmail.com
Sun Jun 7 23:17:00 CEST 2015


Well, I'm worried about the bugs in expr and that they get fixed actually,
there are more bugs I found by the way. Now Shahrokh doesn't seem to be
working on it and making updates anymore. I remember I complained about
something in 2009 to him and it never got fixed. I could list them all as
well, but I won't make a bug report if it can't be fixed...

So, what could we do? Could we just fix it and update it? Or does he have
to do it?

I remember some issues regarding its license as well, but never really
understood them, maybe the license issue prevents people from updating it?

cheers

2015-06-07 17:51 GMT-03:00 Jan Baumgart <raga.raga at gmx.de>:

> You can substitute the copysign function with this ugly thing:
>
> [expr $f1*if($f2==0, 1, $f2/abs($f2))]
>
> cheers,
> jan
>
>
> On 06/07/2015 10:39 PM, Jan Baumgart wrote:
>
>> It's spelled "copysig" in expr.
>> But I couldn't get it to work.
>>
>> copysig in expr only takes one argument, whereas the c math function
>> takes two arguments:
>> float copysignf(float x, float y);
>>
>> It returns the absolute value of x with the sign of y.
>>
>> Smells like a bug to me...
>>
>> cheers,
>> Jan
>>
>> On 06/07/2015 09:57 PM, Alexandre Torres Porres wrote:
>>
>>> hi there, I was checking the source of expr (find it attached) and saw
>>> this "copysign" function that I needed for a formula, but I can't get it
>>> to work/load.
>>>
>>> I'm trying something like [expr copysign($f1)] and it's not happening.
>>> The expr manual page in http://yadegari.org/expr/expr.html tells about
>>> this function as well, here it is:
>>>
>>> copysign()
>>>     1
>>>     copy sign of a number(added in version 0.4)
>>>
>>>
>>> So it seems I'm supposedly doing the right thing... is it a bug? I'm on
>>> extended 0.42 and it says that it's expr version 0.4 when it loads.
>>>
>>> cheers
>>>
>>>
>>> _______________________________________________
>>> Pd-list at lists.iem.at mailing list
>>> UNSUBSCRIBE and account-management ->
>>> http://lists.puredata.info/listinfo/pd-list
>>>
>>>
>>
> --
> Jan Baumgart
> Technischer Mitarbeiter
> Hochschule für Musik und Darstellende Kunst
> Eschersheimer Landstr. 29-39
> 60322 Frankfurt am Main
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150607/09a3caa7/attachment.html>


More information about the Pd-list mailing list