kaskr / adcomp

AD computation with Template Model Builder (TMB)
Other
176 stars 80 forks source link

pow() function #38

Closed mebrooks closed 10 years ago

mebrooks commented 10 years ago

Is there a function in TMB that is like the pow function in ADMB? I need to raise a parameter to the power of a data object. The exponent (data) is between 0 and 30.

kaskr commented 10 years ago

You can use the pow function in TMB as well. Depending on your application consider doing your calculations on a log-scale as far as possible to avoid numerical issues with large exponents.

mebrooks commented 10 years ago

pow() is part of cppad and should be documented there.