aboutsummaryrefslogtreecommitdiff
path: root/modules/bdiag.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bdiag.c')
-rw-r--r--modules/bdiag.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/bdiag.c b/modules/bdiag.c
index 37a0349..be2b8c4 100644
--- a/modules/bdiag.c
+++ b/modules/bdiag.c
@@ -22,9 +22,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
-#include "m_pd.h"
-#include <math.h>
+#include "extlib_util.h"
#include <stdio.h>
#include <stdlib.h>
@@ -170,6 +168,9 @@ static t_int *bdiag_perform(t_int *w)
s1new = (a * s1) - (b * s2) + u1; /* update state */
s2new = (a * s2) + (b * s1) + u2;
+ s1new = IS_DENORMAL(s1new) ? 0 : s1new; /* clear denormals */
+ s2new = IS_DENORMAL(s2new) ? 0 : s2new;
+
*state++ = s1new; /* store state */
*state++ = s2new;