aboutsummaryrefslogtreecommitdiff
path: root/pd/src/d_global.c
diff options
context:
space:
mode:
Diffstat (limited to 'pd/src/d_global.c')
-rw-r--r--pd/src/d_global.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pd/src/d_global.c b/pd/src/d_global.c
index 633eba1c..a84a1ae0 100644
--- a/pd/src/d_global.c
+++ b/pd/src/d_global.c
@@ -41,9 +41,9 @@ static t_int *sigsend_perform(t_int *w)
while (n--)
{
float f = *in++;
- /* bash NANs and underflow/overflow hazards to zero */
- if (!((f > 1.0e-20f && f < 1.0e20f) || (f < -1e-20f && f > -1e20)))
+ if (PD_BADFLOAT(f))
f = 0;
+
*out++ = f;
}
return (w+4);
@@ -245,9 +245,8 @@ static t_int *sigthrow_perform(t_int *w)
while (n--)
{
float f = *in++;
- /* bash NANs and underflow/overflow hazards to zero */
- if (!((f > 1.0e-20f && f < 1.0e20f) || (f < -1e-20f && f > -1e20)))
- f = 0;
+ if (PD_BADFLOAT(f))
+ f = 0;
*out++ += f;
}
}