<div id="mb_3">Sorry, "reply" instead of "reply all" again.<br>
<br>
Well, it seemed impossible to me, but here what I found in d_math.c (pd
0.40.0 or something, I'm a bit lazy to look for version):<br>
<br>
static t_int *sigwrap_perform(t_int *w)<br>
{<br>
float *in = *(t_float **)(w+1), *out = *(t_float **)(w+2);<br>
t_int n = *(t_int *)(w+3);<br>
while (n--)<br>
{<br>
float f = *in++;<br>
int k = f;<br>
if (f > 0) *out++ = f-k;<br>
else *out++ = f - (k-1);<br>
}<br>
return (w + 4);<br>
}<br>
<br>
Here it definitely says:<br>
if f <= 0 then return f - ((int f) - 1) = f - (int f) + 1 = frac(f) + 1<br>
which is 1 for each non-positive int, of course, and assumes
float-to-int conversions (int k = f) take 'neares to zero' which seems
a dangerous assumption for me (I guess, it should return frac(f) + 1,
where 0<=frac<1 for each negative number; perhaps, some compiler
flags fix it, it depends on compiler, but for integers the result is
always 1).<br>
I think, the whole situation is worthy a bug report.<br>
</div>