ref: 844078b59ddd849b2ae43d8dd2297e69ba2bc44e
parent: d57d77b890e2c660d628d495d992cc3cc33992f9
author: Matthew Wang <mjw7@princeton.edu>
date: Thu Oct 1 12:48:16 EDT 2020
evn follower nan handling
--- a/leaf/Src/leaf-analysis.c
+++ b/leaf/Src/leaf-analysis.c
@@ -51,6 +51,7 @@
if (x < 0.0f ) x = -x; /* Absolute value. */
+ if (isnan(x)) return 0.0f;
if ((x >= e->y) && (x > e->a_thresh)) e->y = x; /* If we hit a peak, ride the peak to the top. */
else e->y = e->y * e->d_coeff; /* Else, exponential decay of output. */