On 29/01/2007, at 17.22, Denis Trapeznikoff wrote:

That said. Why does wrap~ of fx. the signal -0.99 return 0.00999999?
and wrap~ of fx. - 5.99 return 0.0100002?

It seems that the precision is low: if wrap~ outputs the difference with the signal and the greatest integer, not larger than it, for -0.99 it should return 0.01.

Yes, exactly. I just wondered how-come  it wasn't precise.

BTW, if one wants to get frac part of the signal, then with the current implementation of wrap~ (returning 1 for each non-positive integer)

[wrap~]
|
[wrap~]

should do the work: 0 for any integer and the frac part for any other number.

Here it just swaps it, such that for non-positive integers returns 1, as it with one wrap~ object does for non-negative integers.

I still don't understand how warp~ of non-negative integers signals returns 1. The help files says one are to find the largest integer not exceeding the signal, which for integers are the given integer it self; then find the difference, which is 0; and then calculate difference mod 1, that is 0 mod 1, which is 0. What am i missing?
_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to