![]() |
Prev | Next |
z = pow(
x,
y)
\[
{\rm pow} (x, y) = x^y
\]
This version of the pow
function may use
logarithms and exponentiation to compute derivatives.
This will not work if x is less than or equal zero.
If the value of y is an integer,
the pow_int
function is used to compute this value
using only multiplication (and division if y is negative).
(This will work even if x is less than or equal zero.)
const
Type &
x
where Type is
VecAD<
Base>::reference
,
AD<
Base>
,
Base,
double
,
or
int
.
const
Type &
y
where Type is
VecAD<
Base>::reference
,
AD<
Base>
,
Base,
double
,
or
int
.
AD<
Base>
z
pow
function is included
in the CppAD namespace for the case where both x
and y have the same type and that type is
float
or double
.