Learn R Programming

CVXR (version 1.9.1)

power: Create a Power atom

Description

Create a Power atom

Usage

power(x, p, max_denom = 1024L, approx = TRUE)

Value

A Power or PowerApprox atom, or an exp expression for the const-base case.

Arguments

x

An Expression (the base), OR a positive constant if p is a variable (the identity b^x = exp(x * log(b)) is used).

p

Numeric exponent, Parameter, or Expression. If p is a non-constant Expression and x is a positive constant, dispatches to exp(p * log(x)).

max_denom

Maximum denominator for rational approximation

approx

If TRUE (default), use SOC approximation. If FALSE, use exact power cone.