Skip to content

Commit

Permalink
Minor cleanup of inline code and math for Derivative annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Feb 1, 2021
1 parent 335e0e4 commit a9ec18f
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1359,16 +1359,12 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati

\begin{itemize}
\item
\lstinline[language=grammar]!zeroDerivative = inputVar1 { , zeroDerivative = inputVar2 }!
\lstinline[language=grammar]!zeroDerivative = $\mathit{inputVar}_{1}$ { , zeroDerivative = $\mathit{inputVar}_{2}$ }!
\end{itemize}

The derivative function is only valid if \lstinline!inputVar1! (and \lstinline!inputVar2! etc.)
are independent of the variables the function call is differentiated
with respect to (i.e.\ that the derivative of \lstinline!inputVar1! is zero). The
derivative of \lstinline!inputVar1! (and \lstinline!inputVar2! etc.) are excluded from the
argument list of the derivative-function. If the derivative-function
also specifies a derivative the common variables should have consistent
\lstinline!zeroDerivative!.
The derivative function is only valid if $\mathit{inputVar}_{1}$ (and $\mathit{inputVar}_{2}$ etc.) are independent of the variables the function call is differentiated with respect to (i.e.\ that the derivative of $\mathit{inputVar}_{1}$ is zero).
The derivative of $\mathit{inputVar}_{1}$ (and $\mathit{inputVar}_{2}$ etc.) are excluded from the argument list of the derivative-function.
If the derivative-function also specifies a derivative the common variables should have consistent \lstinline!zeroDerivative!.

\begin{nonnormative}
Assume that function \lstinline!f! takes a matrix and a scalar.
Expand Down Expand Up @@ -1432,15 +1428,12 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati

\begin{itemize}
\item
\lstinline!noDerivative = inputVar1!
\lstinline[language=grammar]!noDerivative = $\mathit{inputVar}_{1}$!
\end{itemize}

The derivative of inputVar1 is excluded from the argument list of the
derivative-function. This relies on assumptions on the arguments to the
function; and the function should document these assumptions (it is not
always straightforward to verify them). In many cases even the
undifferentiated function will only behave correctly under these
assumptions.
The derivative of $\mathit{inputVar}_{1}$ is excluded from the argument list of the derivative-function.
This relies on assumptions on the arguments to the function; and the function should document these assumptions (it is not always straightforward to verify them).
In many cases even the undifferentiated function will only behave correctly under these assumptions.

The inputs excluded using \lstinline!zeroDerivative! or \lstinline!noDerivative! may be of any type (including types not containing reals).

Expand Down

0 comments on commit a9ec18f

Please sign in to comment.