File: diff.tex

package info (click to toggle)
sollya 7.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 13,864 kB
  • sloc: ansic: 117,441; yacc: 8,822; lex: 2,419; makefile: 870; cpp: 76
file content (42 lines) | stat: -rw-r--r-- 1,437 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\subsection{diff}
\label{labdiff}
\noindent Name: \textbf{diff}\\
\phantom{aaa}differentiation operator\\[0.2cm]
\noindent Library name:\\
\verb|   sollya_obj_t sollya_lib_diff(sollya_obj_t)|\\[0.2cm]
\noindent Usage: 
\begin{center}
\textbf{diff}(\emph{function}) : \textsf{function} $\rightarrow$ \textsf{function}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{function} represents a function
\end{itemize}
\noindent Description: \begin{itemize}

\item \textbf{diff}(\emph{function}) returns the symbolic derivative of the function
   \emph{function} by the global free variable.
    
   If \emph{function} represents a function symbol that is externally bound
   to some code by \textbf{library}, the derivative is performed as a symbolic
   annotation to the returned expression tree.
\end{itemize}
\noindent Example 1: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> diff(sin(x));
cos(x)
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 2: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> diff(x);
1
\end{Verbatim}
\end{minipage}\end{center}
\noindent Example 3: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> diff(x^x);
x^x * (1 + log(x))
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{library} (\ref{lablibrary}), \textbf{autodiff} (\ref{labautodiff}), \textbf{taylor} (\ref{labtaylor}), \textbf{taylorform} (\ref{labtaylorform})