[PD] expr modulo negative

Max abonnements at revolwear.com
Tue Oct 14 14:44:40 CEST 2008


thank you andy.
i guess it is a bug anyway, not in the objects, but in the  
documentation. both open the same helppatch with no mention about the  
difference.

max

Am 14.10.2008 um 14:32 schrieb Andy Farnell:

>
> [%] and [mod] treat the sign differently. [mod] is monotonic
> but [%] is symmetrical about zero.
>
> On Tue, 14 Oct 2008 13:45:50 +0100
> Hans Roels <hans.roels at versateladsl.be> wrote:
>
>> Hello,
>>
>> If you want to calculate the modulo of a negative number, you get a
>> different result if you use the 'mod' object or 'expr' with %.
>>
>> -1  4
>> |    |
>> mod
>> |
>> 3
>>
>> -1                 4
>> |                   |
>> expr $f1 % $f2
>> |
>> -1
>>
>> I guess this is a bug in expr ?
>>
>> Hans r
>>
>>
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
>> listinfo/pd-list
>
>
> -- 
> Use the source
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/ 
> listinfo/pd-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: Signierter Teil der Nachricht
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20081014/c1e86d1e/attachment.pgp>


More information about the Pd-list mailing list