|
Prev | Next |
x Op y
AD<Base>.
| Op | Meaning |
+= | x is assigned x plus y |
-= | x is assigned x minus y |
*= | x is assigned x times y |
/= | x is assigned x divided by y |
AD<Base> &x
const Type &y
where Type is
VecAD<Base>::reference,
AD<Base>,
Base, or
double.
AD<Base> z
then the syntax
z = x += y
will compute x plus y
and then assign this value to both x and z.
| AddEq.cpp | AD Computed Assignment Addition: Example and Test |
| SubEq.cpp | AD Computed Assignment Subtraction: Example and Test |
| MulEq.cpp | AD Computed Assignment Multiplication: Example and Test |
| DivEq.cpp | AD Computed Assignment Division: Example and Test |
f
and
g
are
Base functions
\[
\D{[ f(x) + g(x) ]}{x} = \D{f(x)}{x} + \D{g(x)}{x}
\]
\[
\D{[ f(x) - g(x) ]}{x} = \D{f(x)}{x} - \D{g(x)}{x}
\]
\[
\D{[ f(x) * g(x) ]}{x} = g(x) * \D{f(x)}{x} + f(x) * \D{g(x)}{x}
\]
\[
\D{[ f(x) / g(x) ]}{x} =
[1/g(x)] * \D{f(x)}{x} - [f(x)/g(x)^2] * \D{g(x)}{x}
\]