diff --git a/pd/src/d_math.c b/pd/src/d_math.c
index 3c75a94658f115f28ffd0ce4e94aa78df1e7994e..7b385c8bf9df003de5c2e03661ee70c289d9d4ba 100644
--- a/pd/src/d_math.c
+++ b/pd/src/d_math.c
@@ -247,6 +247,20 @@ static void *sigwrap_new(void)
 }
 
 static t_int *sigwrap_perform(t_int *w)
+{
+    t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2);
+    t_int n = *(t_int *)(w+3);
+    while (n--)
+    {
+        t_sample f = *in++;
+        int k = f;
+        if (k <= f) *out++ = f-k;
+        else *out++ = f - (k-1);
+    }
+    return (w + 4);
+}
+
+static t_int *sigwrap_perform_old(t_int *w)
 {
     t_sample *in = *(t_sample **)(w+1), *out = *(t_sample **)(w+2);
     t_int n = *(t_int *)(w+3);
@@ -262,7 +276,9 @@ static t_int *sigwrap_perform(t_int *w)
 
 static void sigwrap_dsp(t_sigwrap *x, t_signal **sp)
 {
-    dsp_add(sigwrap_perform, 3, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
+    dsp_add((pd_compatibilitylevel > 47 ?
+        sigwrap_perform : sigwrap_perform_old),
+            3, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n);
 }
 
 void sigwrap_setup(void)
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index a3b75f1ea78a3280f51280fbcda36c6874b5a264..8e2d86f87e58115df81c058e928ef2b93f9fee42 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.h
@@ -11,7 +11,7 @@ extern "C" {
 #include <stdarg.h>
 
 #define PD_MAJOR_VERSION 0
-#define PD_MINOR_VERSION 47
+#define PD_MINOR_VERSION 48
 #define PD_BUGFIX_VERSION 0
 #define PD_TEST_VERSION ""
 #define PD_L2ORK_VERSION "2.2.3"