Re: [PD] expr modulo negative

2008-10-14 Thread Kyle Klipowicz
I think that since Miller is a self-described math geek, the difference is that [mod] behaves like the mathematical (mod n). [%] is the modulo operator used by computer science. If my memory serves me, in number theory and abstract algebra, the m (mod n) notation is used to define a subset of the

Re: [PD] expr modulo negative

2008-10-14 Thread Hans Roels
ok, so there is no expr function identical to the 'mod' object? Hans r At 13:09 14/10/2008, Frank Barknecht wrote: >Hallo, >Hans Roels hat gesagt: // Hans Roels wrote: > > > Hello, > > > > If you want to calculate the modulo of a negative number, you get a > > different result if you use the 'mod

Re: [PD] expr modulo negative

2008-10-14 Thread Max
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 symmetrica

Re: [PD] expr modulo negative

2008-10-14 Thread Max
maybe someone could explain _what_ the difference is? that would be enlightening vor everybody. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

Re: [PD] expr modulo negative

2008-10-14 Thread 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 <[EMAIL PROTECTED]> wrote: > Hello, > > If you want to calculate the modulo of a negative number, you get a > different result if you use the 'mod' obj

Re: [PD] expr modulo negative

2008-10-14 Thread cyrille henry
you can use pd [mod] object or [%] object. it's not the same for negative umber. expr % is the same than pd %. so i don't see any bug. Cyrille Hans Roels a écrit : > Hello, > > If you want to calculate the modulo of a negative number, you get a > different result if you use the 'mod' object o

Re: [PD] expr modulo negative

2008-10-14 Thread IOhannes m zmoelnig
Hans Roels 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

Re: [PD] expr modulo negative

2008-10-14 Thread Frank Barknecht
Hallo, Hans Roels hat gesagt: // Hans Roels 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 % $f

[PD] expr modulo negative

2008-10-14 Thread Hans Roels
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 __