[ADOL-C] sparse_jac return unreasonable NaN's

Andrea Walther andrea.walther at uni-paderborn.de
Mon Oct 24 08:32:40 EDT 2011


Hello,

> I made some simple test on sparse_jac, and I found that if my function
> is with condassign() and if any branch of condassign() returns a nan,
> the sparse_jac returns a nan,too.  I think it there might be a bug in
> condassign or sparse_jac.

it took a while for us to track down this problem which is not caused by
the handling of the conditional assignments and also not caused by an
error in sparse_jac.

> 
> My function is very simple. y=x/(exp(x)-1) .   However if x is too large
> (x>100 or so) ,exp(x) results in nan,  

this was the source of the error because internally ADOL-C
multiplies a INF resulting from the NAN with a 0 resulting again
in a NAN. This NAN was then propagated instead of the 0 which we
actually want in these cases.

We adapted the sources of ADOL-C in the trunk directory such that
in these cases now a 0 is propagated.

Thanks very much to Xu He for the hint to this subtle error!

Best regards,

Andrea Walther

-- 
Prof. Dr. Andrea Walther
Lehrstuhl fuer Mathematik und ihre Anwendungen
Institut fuer Mathematik
Universitaet Paderborn
Warburger Str. 100
33098 Paderborn

Email: andrea.walther at uni-paderborn.de
Phone: ++49 5251 602721
Fax:   ++49 5251 603728

**********



More information about the ADOL-C mailing list