<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Monospaced;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
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]-->
</head>
<body bgcolor="white" lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">A the error is of the order of %eps, isn’t it expected ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">This is related to the addition of “1” which is done after the loop for the first case, and before the loop in the second
 case. Initializing to A and B to 1 in the first case gives exactly the result of the second case:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#A020F0">…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#A020F0">for</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">i</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">200</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">  
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">A</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><i><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#64AE64">//0;</span></i><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">  
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">B</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><i><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#64AE64">//0;</span></i><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">  
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#A020F0">for</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">10</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">     
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">A</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">A</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">Rpr</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">/</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">Z</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k,i</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">R</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"> 
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">      </span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">B</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">B</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">Rpr</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">/</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">Z</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k,i</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">R</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">  
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#A020F0">end</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">  
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">G</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">i</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">A</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">./</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">B;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><i><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#64AE64">// (1 + A) / (1 + B);</span></i><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#A020F0">end</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">A</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">B</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#A020F0">for</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">10</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">  
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">A</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">A</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">Rpr</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">./</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">Z</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k,</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">R</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"> 
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">   </span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">B</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">B</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">Rpr</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">./</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">Z</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k,</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">alfa</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">k</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">R</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#A020F0">end</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">G1</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">A</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#5C5C5C">./</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext">
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif">B;</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">--> [M, ind] = max(abs(G - G1))<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">M  =
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">   0.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">ind  =
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Monospaced",serif;color:#4A55DB">   1.</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Denis<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">De :</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"> users <users-bounces@lists.scilab.org>
<b>De la part de</b> Federico Miyara<br>
<b>Envoyé :</b> lundi 25 avril 2022 10:00<br>
<b>À :</b> Users mailing list for Scilab <users@lists.scilab.org><br>
<b>Objet :</b> [Scilab-users] Strange behavior of explicit vs implicit iteration<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US"><br>
</span><span style="font-family:"Courier New"">Dear All,<br>
<br>
Here I have the following script, where I compute the same thing using two iteration methods:</span><o:p></o:p></p>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">alfa </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#32B9B9">rand</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">,</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">10</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">Rpr </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#32B9B9">rand</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">()</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">R </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#32B9B9">rand</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">()</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">Z </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#32B9B9">rand</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">10</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">,</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">200</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">; <o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p> </o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">G </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#32B9B9">zeros</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">,</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">200</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#A020F0">for</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> i</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">200</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">   A </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">0</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">   B </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">0</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">   </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#A020F0">for</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> k </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">10</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">      A </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> A </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> Rpr</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">/</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">Z</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k,i</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">R</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;  <o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">      B </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> B </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> Rpr</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">/</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">Z</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k,i</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">R</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">   </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#A020F0">end</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">   G</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">i</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> A</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">/</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> B</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#A020F0">end</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p> </o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">A </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">B </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#A020F0">for</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> k </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">10</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">   A </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> A </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> Rpr</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">./</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">Z</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k,</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">R</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;  <o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">   B </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> B </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> Rpr</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">./</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">Z</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k,</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#FFAA00">:</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">+</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:rosybrown">1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">-</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> alfa</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">k</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">))</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">*</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">R</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">)</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#A020F0">end</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif">G1 </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> A </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">./</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> B;<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif"><o:p> </o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">[</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">M, ind</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">]</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C">=</span><span style="font-size:13.5pt;font-family:"Monospaced",serif"> </span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#32B9B9">max</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#32B9B9">abs</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">(</span><span style="font-size:13.5pt;font-family:"Monospaced",serif">G</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#5C5C5C"> - </span><span style="font-size:13.5pt;font-family:"Monospaced",serif">G1</span><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB">))<o:p></o:p></span></pre>
<pre><span style="font-size:13.5pt;font-family:"Monospaced",serif;color:#4A55DB"><o:p> </o:p></span></pre>
<p class="MsoNormal"><span style="font-family:"Courier New"">However, the last line shows that there are differences between both methods. They are tiny (near %eps), but I can't find nor imagine which is the reason.<br>
<br>
NOTE: I kept the original formulas as in the script where the problem arised but changed the data. When I tried to use a simpler formula there was no difference.<br>
<br>
Any idea?<br>
<br>
Regards,<br>
<br>
Federico Miyara</span><o:p></o:p></p>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="1" cellspacing="3" cellpadding="0" style="border:none;border-top:solid #D3D4DE 1.0pt">
<tbody>
<tr>
<td width="57" style="width:41.25pt;border:none;padding:13.5pt .75pt .75pt .75pt">
<p class="MsoNormal"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><span style="text-decoration:none"><img border="0" width="46" height="29" style="width:.4791in;height:.3055in" id="_x0000_i1025" src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"></span></a><o:p></o:p></p>
</td>
<td width="415" style="width:352.5pt;border:none;padding:12.75pt .75pt .75pt .75pt">
<p class="MsoNormal" style="line-height:13.5pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#41424E">Libre de virus.
<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank">
<span style="color:#4453EA">www.avast.com</span></a> <o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>