<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">&gt;&gt; I'm anxious to know what limit is reached in the coefficients of the filter that causes the undefined result (NaN).<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">&gt;<br>&gt;I haven't seen the code, but I just want to make you notice that adding together -Infinity and +Infinity results in a NaN&nbsp;; so does subtracting <br>&gt;two infinities of the same sign.<br>&gt;<br>&gt;So, the NaN might happen when two expressions that are supposed to partially cancel each other, happen to both overflow, in different directions.<br>&gt;<br>&gt;There are various possible causes for NaN, but with formulas that only involve +, - and *, the possibilities are a lot more limited.<br><br>Hmmm.<br>I think that's why it
 puzzles me so. Can you see a / anywhere here?<br><br>&nbsp; while (n--) {<br>&nbsp;&nbsp;&nbsp; i1=(*in++);<br>&nbsp;&nbsp;&nbsp; fc1 = (*fc++);<br>&nbsp;&nbsp;&nbsp; res1 = (*res++);<br>&nbsp;&nbsp;&nbsp; q = 1.0f - fc1;<br>&nbsp;&nbsp;&nbsp; p = fc1 + 0.8f * fc1 * q;<br>&nbsp;&nbsp;&nbsp; fcoeff = p + p - 1.0f;<br>&nbsp;&nbsp;&nbsp; q = res1 * (1.0f + 0.5f * q * (1.0f - q + 5.6f * q * q));<br>&nbsp;&nbsp;&nbsp; i1 -= q * xb4;<br>&nbsp;&nbsp;&nbsp; t1 = xb1;<br>&nbsp;&nbsp;&nbsp; xb1 = (i1 + xb0) * p - xb1 * fcoeff;<br>&nbsp;&nbsp;&nbsp; t2 = xb2;<br>&nbsp;&nbsp;&nbsp; xb2 = (xb1 + t1) * p - xb2 * fcoeff;<br>&nbsp;&nbsp;&nbsp; t1 = xb3;<br>&nbsp;&nbsp;&nbsp; xb3 = (xb2 + t2) * p - xb3 * fcoeff;<br>&nbsp;&nbsp;&nbsp; xb4 = (xb3 + t1) * p - xb4 * fcoeff;<br>&nbsp;&nbsp;&nbsp; xb4 = xb4 - xb4 * xb4 * xb4 * 0.166667f;<br>&nbsp;&nbsp;&nbsp; xb0 = i1;<br>&nbsp;&nbsp;&nbsp; *out++ = xb4; <br>&nbsp;}<br><br>No reciprocals, no divisions, just +,-,*.<br>I cannot
 help thinking I must be reaching a "limit" in the calculus sense...<br><br>Ed<br><br><br><br><br> ______________________________________________________________________<br>| Mathieu BOUCHARD ----- téléphone&nbsp;: +1.514.383.3801 ----- Montréal, QC<br><br> </div> </div>  </div></body></html>