-
Notifications
You must be signed in to change notification settings - Fork 1
Description
If an RHS calls a function f that has no nondifferentiabilities, then f does not need to be preprocessed.
However, if f in turn calls a function g that does contain nondifferentiabilities, then f will need (some, minor) preprocessing: The preprocessed g has a new name, so the calls to g inside f need to be updated and equipped with an updateFunctionIndex call.
This mechanism already works (see preprocess_fcnInRhs.m) - but only for one level of function chaining.
Meaning if, instead of f calling g, f calls another function h which calls g and which contains no nondifferentiabilities, then IFDIFF will fail to recognize that f should be included in the preprocessing, and calls to f in the RHS will be left unchanged, leading to disastrous results.
To do: Change the mechanism for handling these transitively-called nondifferentiabilities so that it can handle arbitrarily long chains of function calls.