<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Gene,</p>
    <p>most likely the problem is one of number representation (which
      contributes to rounding errors).</p>
    <p>The binary representation of $Av+0.05 is (by which I mean "the
      result of binary representation of $Av plus binary respresentation
      of 0.05 as a binary")<br>
    </p>
    <p>10.101100110011001100110011001100110011001100110011001</p>
    <p>whereas the binary representation of 2.7 is</p>
    <p>10.101100110011001100110011001100110011001100110011010</p>
    <p>Both binary numbers differ only in the last two digits and the
      second one is larger. That explains why 2.7 is not accepted.</p>
    <p>I have done the computations on  64-bit machine which likely
      matches your server's resolution.</p>
    <p>I hope this is of help.</p>
    <p>Peter<br>
    </p>
    <div class="moz-cite-prefix">Am 22.09.2019 um 02:51 schrieb Harding,
      Gene L:<br>
    </div>
    <blockquote type="cite"
cite="mid:MWHPR22MB05903E7ABF8104FB1AB0ED1CB08A0@MWHPR22MB0590.namprd22.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Hi everyone,<o:p></o:p></span></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I have a quiz problem in LC that seems to
          be doing some odd things with the rounding. I have
          successfully recreated the problem reported by one of my
          students, but cannot figure out why it happens.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">The answer to the problem (part c) is 2.65
          on the dot. The problem requests an answer with one place
          after the decimal, and the tolerance is +/- 0.05. In this
          case, since the value computes to exactly 2.65, LC should take
          anything from 2.6 to 2.7. In fact, in author view LC indicates
          it will take anything from 2.6 to 2.7:<o:p></o:p></p>
        <p class="MsoNormal"><img style="width:2.8541in;height:.3541in"
            id="Picture_x0020_1"
            src="cid:part1.99A52A7F.672D8F68@ostfalia.de" class=""
            width="274" height="34"><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">The trouble is that 2.6 works, 2.65 works,
          but 2.7 does not.
          <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">This is the Perl script calculation (Rf=33,
          Ri=20):<o:p></o:p></p>
        <p class="MsoNormal">$Av         = 1+$Rf/$Ri;           # Gain 
          <o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">This is the response code:<o:p></o:p></p>
        <p class="MsoNormal"><numericalresponse unit="" format="1f"
          answer="$Av" id="3"><o:p></o:p></p>
        <p class="MsoNormal">        <responseparam name="tol"
          type="tolerance" default="0.05" description="Numerical
          Tolerance" /><o:p></o:p></p>
        <p class="MsoNormal">        <textline readonly="no"
          spellcheck="none" /><o:p></o:p></p>
        <p class="MsoNormal"></numericalresponse><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Any idea what the problem is? I am baffled.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Best regards,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Gene L. Harding, PE<o:p></o:p></p>
        <p class="MsoNormal">Associate Professor of ECET<o:p></o:p></p>
        <p class="MsoNormal">Purdue University<o:p></o:p></p>
        <p class="MsoNormal">574-520-4190<o:p></o:p></p>
        <p class="MsoNormal"><a
            href="https://polytechnic.purdue.edu/south-bend/"
            moz-do-not-send="true">https://polytechnic.purdue.edu/south-bend/</a><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
LON-CAPA-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a>
<a class="moz-txt-link-freetext" href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Peter Riegler
Fakultät Informatik
Ostfalia Hochschule für angewandte Wissenschaften
- Hochschule Braunschweig/Wolfenbüttel
Salzdahlumer Str. 46/48
38302 Wolfenbüttel

Tel 05331 939 31540
Fax 05331 939 31542
Web <a class="moz-txt-link-abbreviated" href="http://www.ostfalia.de/pws/riegler">www.ostfalia.de/pws/riegler</a> </pre>
  </body>
</html>