[PD] expr modulo negative

Hans Roels hans.roels at versateladsl.be
Tue Oct 14 16:15:15 CEST 2008


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' object or 'expr' with %.
> >
> > -1  4
> > |    |
> > mod
> > |
> > 3
> >
> > -1                 4
> > |                   |
> > expr $f1 % $f2
> > |
> > -1
> >
> > I guess this is a bug in expr ?
>
>Not really: Pd also has a builting [% ] object, which behaves like the
>% in expr.
>
>Ciao
>--
>  Frank Barknecht                                     _ ______footils.org__
>
>_______________________________________________
>Pd-list at iem.at mailing list
>UNSUBSCRIBE and account-management -> 
>http://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list