R/197_reductions_dgp2dcp_canonicalizers_div_canon.R

Defines functions .dgp_div_canon

#####
## DO NOT EDIT THIS FILE!! EDIT THE SOURCE INSTEAD: rsrc_tree/reductions/dgp2dcp/canonicalizers/div_canon.R
#####

## CVXPY SOURCE: reductions/dgp2dcp/canonicalizers/div_canon.py
## DGP canonicalizer for DivExpression: x/y = x * y^(-1) -> log(x) - log(y)

.dgp_div_canon <- function(expr, args) {
  list(args[[1L]] - args[[2L]], list())
}

Try the CVXR package in your browser

Any scripts or data that you put into this service are public.

CVXR documentation built on March 6, 2026, 9:10 a.m.