<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Can &amp;quot;greater_or_equal&amp;quot; be used to comparing floating point values? in Bifrost Forum</title>
    <link>https://forums.autodesk.com/t5/bifrost-forum/can-quot-greater-or-equal-quot-be-used-to-comparing-floating/m-p/10460039#M3253</link>
    <description>&lt;P&gt;Can&amp;nbsp;"&lt;STRONG&gt;greater_or_equal&lt;/STRONG&gt;" be used to&amp;nbsp;comparing floating point values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the manual, the description of "&lt;STRONG&gt;equal&lt;/STRONG&gt;" has a paragraph: "Please use almost_equal, equivalent_float_epsilon, or equivalent_float_ULP when comparing floating-point values.".&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/BIFROST/ENU/?guid=Bifrost_Common_reference_amino_equal_html" target="_blank"&gt;https://help.autodesk.com/view/BIFROST/ENU/?guid=Bifrost_Common_reference_amino_equal_html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"&lt;STRONG&gt;greater_or_equal&lt;/STRONG&gt;" also has "&lt;STRONG&gt;equal&lt;/STRONG&gt;", can it be used to compare floating-point numbers? or, it's better to use "less" logically instead? for example:&lt;/P&gt;&lt;P&gt;use&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;not(a &amp;lt; b)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a &amp;gt;= b&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Jul 2021 18:30:20 GMT</pubDate>
    <dc:creator>g2m.agent</dc:creator>
    <dc:date>2021-07-11T18:30:20Z</dc:date>
    <item>
      <title>Can "greater_or_equal" be used to comparing floating point values?</title>
      <link>https://forums.autodesk.com/t5/bifrost-forum/can-quot-greater-or-equal-quot-be-used-to-comparing-floating/m-p/10460039#M3253</link>
      <description>&lt;P&gt;Can&amp;nbsp;"&lt;STRONG&gt;greater_or_equal&lt;/STRONG&gt;" be used to&amp;nbsp;comparing floating point values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the manual, the description of "&lt;STRONG&gt;equal&lt;/STRONG&gt;" has a paragraph: "Please use almost_equal, equivalent_float_epsilon, or equivalent_float_ULP when comparing floating-point values.".&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/BIFROST/ENU/?guid=Bifrost_Common_reference_amino_equal_html" target="_blank"&gt;https://help.autodesk.com/view/BIFROST/ENU/?guid=Bifrost_Common_reference_amino_equal_html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;"&lt;STRONG&gt;greater_or_equal&lt;/STRONG&gt;" also has "&lt;STRONG&gt;equal&lt;/STRONG&gt;", can it be used to compare floating-point numbers? or, it's better to use "less" logically instead? for example:&lt;/P&gt;&lt;P&gt;use&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;not(a &amp;lt; b)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;instead of&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a &amp;gt;= b&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 18:30:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/bifrost-forum/can-quot-greater-or-equal-quot-be-used-to-comparing-floating/m-p/10460039#M3253</guid>
      <dc:creator>g2m.agent</dc:creator>
      <dc:date>2021-07-11T18:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can "greater_or_equal" be used to comparing floating point values?</title>
      <link>https://forums.autodesk.com/t5/bifrost-forum/can-quot-greater-or-equal-quot-be-used-to-comparing-floating/m-p/10462279#M3254</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, greater_or_equal &lt;EM&gt;can&lt;/EM&gt; be used with floating-point values. Whether or not it &lt;EM&gt;should&lt;/EM&gt; be used is another question, and the answer depends on the exact situation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue arises from the imprecision that is inherent in floating-point math. In brief, floating-point values can't represent real numbers exactly, and the more math operations that you perform on them, the farther they may drift from the exact real value. A value that "should" be 1.0, such as sin(pi/2), may actually be sin(something_close_to_pi/2) and evaluate as something like .99998. In such a case, comparing the result to 1.0 using greater_or_equal will yield false, even though the value should be 1.0 and therefore true.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using almost_equal or the epsilon/ULP nodes allows you to declare how accurate you want the result to be, in other words, what you consider to be "close enough".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that helps,&lt;/P&gt;
&lt;P&gt;gray&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 15:16:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/bifrost-forum/can-quot-greater-or-equal-quot-be-used-to-comparing-floating/m-p/10462279#M3254</guid>
      <dc:creator>Grahame_Fuller</dc:creator>
      <dc:date>2021-07-12T15:16:50Z</dc:date>
    </item>
  </channel>
</rss>

