<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    I doubt this is a new issue. The underlying arithmetic is IEEE 754.<br>
    Floating point numbers have the following problems (at least):<br>
    <br>
    - addition is not associative<br>
    - not all decimal numbers within the range of representable numbers
    are representable exactly<br>
    <br>
    Basically, it is rarely justifiable to test for equality of doubles.<br>
    <br>
    Edward<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 3/4/14 11:21 AM, Matt Jones wrote:<br>
    </div>
    <blockquote
cite="mid:CAFSW8x=nNPjuXsftGO9BDUWcWpCwCm0fzxhJjpW9Uf2r_YGX1Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">Daniel and Christopher --
        <div><br>
        </div>
        <div>Do either of you have any insight into this new rounding
          issue?  Can you confirm whether or not this is new behavior?</div>
        <div><br>
        </div>
        <div>Matt<br>
          <br>
          <div class="gmail_quote">
            ---------- Forwarded message ----------<br>
            From: <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:noreply@nceas.ucsb.edu">noreply@nceas.ucsb.edu</a>></span><br>
            Date: Tue, Mar 4, 2014 at 3:24 AM<br>
            Subject: [Kepler - Bug #6439] (New) Double rounding fails in
            some cases while evaluating Expressions<br>
            To: <br>
            <br>
            <br>
            <div>
              <span></span>
              Issue #6439 has been reported by Owsiak Michal.
              <hr>
              <h1><a moz-do-not-send="true"
                  href="https://projects.ecoinformatics.org/ecoinfo/issues/6439"
                  target="_blank">Bug #6439: Double rounding fails in
                  some cases while evaluating Expressions</a></h1>
              <ul>
                <li>Author: Owsiak Michal</li>
                <li>Status: New</li>
                <li>Priority: Urgent</li>
                <li>Assignee: Derik Barseghian</li>
                <li>Category: actors</li>
                <li>Target version: 2.3.0</li>
                <li>Bugzilla-Id: </li>
              </ul>
              <p>It seems that addition of doubles can produce values
                slightly different than they should to be.</p>
              <p>Please take a look at attached workflow
                (simple_error.xml).</p>
              <p>Condition that should be satisfied to escape the loop
                is: 1.7 > 1.5 + 0.1</p>
              <p>However, loop is interrupted sooner, because of
                incorrect calculation of doubles. Value of "p" is set
                to: 1.6000000000000003</p>
              <p>This, of course, makes it impossible to use doubles as
                check points for the loops.</p>
              <p>However, it seems that casting to string and back works
                fine (take a look at second workflow - simple.xml)</p>
              <p>Cheers</p>
              <p>Michal</p>
              <hr>
              <span>
                <p>You have received this notification because you have
                  either subscribed to it, or are involved in it.<br>
                  To change your notification preferences, please click
                  here: <a moz-do-not-send="true"
                    href="https://projects.ecoinformatics.org/ecoinfo/my/account"
                    target="_blank">https://projects.ecoinformatics.org/ecoinfo/my/account</a></p>
              </span>
            </div>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kepler-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kepler-dev@kepler-project.org">Kepler-dev@kepler-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>