Hi Casper,<br><br>I may have a fix to the problem.  It turns out, one of the arrays just needed to be<br>larger.  I'll will verify the fix with the other core developers, then have a update for<br>you by next week.<br><br>For now, the line below needs to be split.<br>r[0]  = ( lambda(a,a0,a1,a2,b1,b2)*sigmoid(a,alpha,beta,b,rho) + lambda(b,a0,a1,a2,b1,b2)*sigmoid(b,alpha,beta,b,rho) ) * (b - a) / two; <br> <br>For example,<br>dvariable A = lambda(a,a0,a1,a2,b1,b2)*sigmoid(a,alpha,beta,b,rho);<br>dvariable B= lambda(b,a0,a1,a2,b1,b2)*sigmoid(b,alpha,beta,b,rho);<br>r[0]  = (  A + B ) * (b - a) / two; <br><br>This should allow you to continue working, until a updated distribution is<br>available.  <br><br>Sorry for the inconvenience,<br>Johnoel<br><br>----- Original Message -----<br>From: Casper Berg <cbe@aqua.dtu.dk><br>Date: Thursday, September 3, 2009 8:45 am<br>Subject: [ADMB Users] Strange results for simple computation<br>To: users@admb-project.org<br><br> <span><p>  <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> <meta name="Generator" content="MS Exchange Server version 6.5.7654.12"> <title><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font>Strange results for simple computation</title> <table><tbody><tr><td><p> <!-- Converted from text/rtf format -->  </p><p><font face="Arial" size="2"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font>Hello,</font> </p>  <p><font face="Arial" size="2">I am experiencing some very strange behaviour in my ADMB-program (small working example attached).</font>  <br><font face="Arial" size="2"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font>I use the version from admb-9.0.363-win32-mingw-gcc3.4.zip.</font> </p>  <p><font face="Arial" size="2">I get the following output:</font> </p>  <p><font face="Arial" size="2"> r[0] = (0.00679635 * 0.0109971 + 0.0188592 * 1)* ((2.5 - -89.3986) / 2) = -2.65884</font>  <br><font face="Arial" size="2"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font> r[0] = (0.00679635 * 0.0109971 + 0.0188592 * 1)* -23.4045 = -2.65884</font> </p>  <p><font face="Arial" size="2">I expected the following:</font> </p>  <p><font face="Arial" size="2">r[0] = (0.00679635 * 0.0109971 + 0.0188592 * 1)* ((2.5 - -89.3986) / 2) = 0.8700013</font>  <br><font face="Arial" size="2"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font>r[0] = (0.00679635 * 0.0109971 + 0.0188592 * 1)* 45.9493 = 0.8700013</font> </p>  <p><font face="Arial" size="2">The result of the computation is completely wrong, both the result of the second paranthesis (-23.4 instead of 45.9) and</font></p>  <p><font face="Arial" size="2">even if -23.4 was correct, then the final result -2.66 is wrong (should then be -0.44).</font> </p>  <p><font face="Arial" size="2">I hope someone can explain to me why this voodoo is happening...</font> </p>  <p><font face="Arial" size="2">best regards,</font>  <br><font face="Arial" size="2"><font style="font-style: normal; font-weight: normal; background-color: rgb(245, 248, 240); font-size: 14px;">> </font>Casper Berg.</font> </p>  <p><font color="#000000" face="Arial" size="2"> <<ingestion.tpl>> </font> </p>  </td></tr></tbody></table> </p></span>> _______________________________________________<br>> Users mailing list<br>> Users@admb-project.org<br>> http://lists.admb-project.org/mailman/listinfo/users