[CppAD] signal for domain violation errors

Stefan Vigerske stefan at math.hu-berlin.de
Wed Mar 11 05:39:35 EDT 2009


Hi,

how does CppAD signal when there was an evaluation error, i.e., a
function or its derivative is not defined at the point where it is
evaluated.
E.g., when I have a sqrt(x), I first evaluate it with x=1 and let CppAD
record this.
What happens when I do forward sweep to evaluate this function at x=-1?

Or what happens when I evaluate at x=0 and then ask for the Jacobian at
the same point?

Do I need to check the results for nan's and inf's or is there an
exception thrown? In the former case, will such a check always work also
when compiled in optimized mode (some compilers seem to be not exact on
this in optimized mode, e.g., when -mp is used with intel compilers)?

Thanks,
Stefan

-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan



More information about the CppAD mailing list