<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 19, 2015 at 3:06 AM, cy18 <span dir="ltr"><<a href="mailto:thecy18@gmail.com" target="_blank">thecy18@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I think these would be useful and easy to implement.</div><div><br></div><div>    greater_close(a, b) = greater_equal(a, b) | isclose(a, b)</div><div>    less_close(a, b) = less_equal(a, b) | isclose(a, b)</div><div>    greater_no_close = greater(a, b) & ~isclose(a, b)</div><div>    less_no_close = less(a, b) & ~isclose(a, b)</div></div></blockquote><div><br></div><div>What's the use-case here? we need is_close because we want to test equality, but precision errors are such that two floats may be as close to equal as they can be given the computations done. And the assumption is that you don't care about the precision to the point you specify.</div><div><br></div><div>But for a greater_than (or equiv) comparison, if you the precision is not important beyond a certain level, then it's generally not important whether you get greater than or less than when it's that close....</div><div><br></div><div>And this would great a wierd property that some values would be greater than, less than, and equal to a target value -- pretty weird!</div><div><br></div><div>note that you can get the same effect by subtracting a bit from your comparison value for a greater than check...</div><div><br></div><div>But maybe there is a common use-case that I'm not thinking of..</div><div><br></div><div>-CHB</div></div><div><br></div>-- <br><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>