<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 1, 2016, at 3:44 PM, ted van gaalen &lt;<a href="mailto:tedvgiosdev@gmail.com" class="">tedvgiosdev@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">They are not random tolerances and also not global as one</div><div class="">can set a specific (fine tuned) tolerance bandwidth for 1 or more</div><div class="">statements, following such a directive, until another, or a reset.</div><div class="">e.g.</div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">&nbsp; &nbsp; @floatingPointComparisonTolerance = 0.001 //tuned for a specific situation.</span></div><div class=""><br class="">&nbsp; &nbsp; &nbsp;if a == b {} &nbsp; &nbsp; // this statement is affected..</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="">&nbsp; &nbsp; &nbsp; If &nbsp; c != d {} &nbsp; // ..and also this one. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="">&nbsp; &nbsp; <span style="background-color: rgba(255, 255, 255, 0);" class="">&nbsp;@resetFloatingPointComparisonTolerance &nbsp;// default is none</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">&nbsp; &nbsp; &nbsp;if a == b &nbsp; // here, no longer a tolerance band is active.</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">&nbsp; &nbsp; &nbsp;</span></div><div class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><br class=""></span></div><div class="">So, it is not global, but only in effect for statements in between/after these directives.</div></div></div></blockquote><div><br class=""></div><div>If we literally follow the APL model, then the tolerance is global state that nonlocally changes the behavior of every operation. We don't do this kind of implicit parameterization anywhere else, and similar features have proven to be brittle to use in practice (see also, for instance, the ability for Perl and some BASIC languages to dynamically set the array index base to 0 or 1, catastrophically breaking any code you call into that expects the other base).</div><div><br class=""></div><div>-Joe</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class="">Nothing new here. Comparison tolerance has been in use in e.g. APL since ca 1975, see here for a good explanation.</div><div class=""><br class=""></div><div class=""><a href="http://microapl.com/apl_help/ch_020_070_150.htm" class="">http://microapl.com/apl_help/ch_020_070_150.htm</a></div></div></div></blockquote><br class=""></div><div><br class=""></div><br class=""></body></html>