On 8/12/07, <b class="gmail_sendername">Michael Niedermayer</b> <<a href="mailto:michaelni@gmx.at">michaelni@gmx.at</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br><br>On Sun, Aug 12, 2007 at 10:45:02AM +0200, reynaldo wrote:<br>[...]<br>> +<br>> + if(lag[i] == 140.5 || lag[i] == 141.5 || lag[i] == 142.5)<br><br>be carefull with == checks and floating point variables
<br>this can fail in cases like<br>140.499999 != 140.5</blockquote><div><br>Thinking about this twice, lag can only be of the form a+b*0.5 where a E N<br>and b [0,1], ie ....20, 20.5, 21, 21.5, .... So while not perfect it may be safe
<br>to do this comparission. Ill keep this in mind though.<br><br>Reynaldo<br></div><br></div><br>