pow_int: Power function for integer-valued exponent

View source: R/nimbleFunction_Rexecution.R

pow_intR Documentation

Power function for integer-valued exponent

Description

pow function with exponent required to be integer

Usage

pow_int(a, b)

Arguments

a

Base

b

Exponent

Details

This is required in nimble models and nimbleFunctions if derivatives will be tracked but tracked only with respect to a, such that b might be any (positive, 0, or negative) integer. This contrasts with pow(a, b) (equivalent to a^b), which requires b > 0 if derivatives will be tracked, even if they will only be requested with respect to a.

Value

a^b


nimble documentation built on Sept. 11, 2024, 7:10 p.m.