octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #52569] unexptected error occured when using d


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #52569] unexptected error occured when using dynare with octave
Date: Fri, 1 Dec 2017 15:25:09 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #4, bug #52569 (project octave):

Yes, the error handling is a bit clumsy.  That's due to the fact that the core
numerical routine is in FORTRAN (not my emphasis, but stands for FORMula
TRANslation) so the only convenient error messages are from FORTRAN's
messaging.

I can make a guess as to what the issue is with this routine.  Note the
following about this part of the algorithm:


      DO 20 K=1,200
        FK = K
        T = (A+FK)*X*(1.D0+R)
        R = T/((AX+FK)*(A1X+FK)-T)


It seems that if both A and X are large, R doesn't become small (i.e., such
that P = R*P starts to diminish) until K gets on the order of A and X.  So,
obviously if we choose A and X >> 200 it could be that not much happens to the
final value until K approaches 200.  In other words, if I were to investigate
I'd look at whether the issue here isn't so much "convergence" the way we
think, but more a case of not choosing the range of K suitable to the values
of X and A.  Stated differently, it may be that for a given X and A there is a
value of K which most contributes to the final result S = S + P and that value
of K (call it K_0) may be larger than 200.  So one wonders if the problem
should be transformed such that loop-indexing is more like

K_0
K_0 + 1
K_0 - 1
K_0 + 2
K_0 - 2

etc.  Something like that might always converge within a reasonable number of
iterations.

However, I don't want to go into that much depth of investigation at the
moment.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52569>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]