<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      Le 14/12/2017 à 21:54, David Brant a écrit :<br>
    </div>
    <blockquote
cite="mid:DB6P189MB0293C8A07ED8C42635E3CB10D80A0@DB6P189MB0293.EURP189.PROD.OUTLOOK.COM"
      type="cite">
      <pre wrap="">Hello

I'm not fully conversant with Matlab, but offered to help my daughter 
with a tutorial in Scilab ... and then Matlab!

Basically Matlab gives the 'expected' tutorial answer (n=17), and scilab 
does not! Hopefully this is down to my lack of expertise, but i would 
very much like understand why.

Does the problem require the use of floating-point relative accuracy 
feature (%eps)?</pre>
    </blockquote>
    <br>
    Yes. The stopping test is<br>
    <pre style="font-family:Monospaced;font-style:normal;font-size:12.0;"><span style="color:rgb(160,32,240);">if</span> <span style="color:rgb(0,0,0);">dif</span><span style="color:rgb(92,92,92);">/</span><span style="color:rgb(0,0,0);">S</span> <span style="color:rgb(92,92,92);"><=</span> <span style="color:rgb(218,112,214);">%eps
  break
end
</span></pre>
    This stops at n=17 as well.<br>
    <br>
    Samuel<br>
    <br>
  </body>
</html>