The difference \(1 - x\) with domain \(\{x : 0 < x < 1\}\).
Value
An Expression representing one minus the input restricted to \((0,1)\).
Details
This atom is log-log concave.
Examples
x <- Variable(pos = TRUE)
y <- Variable(pos = TRUE)
prob <- Problem(Maximize(one_minus_pos(x*y)), list(x <= 2 * y^2, y >= .2))
result <- solve(prob, gp = TRUE)
result$value
#> [1] 1
result$getValue(x)
#> [1] 6.332083e-14
result$getValue(y)
#> [1] 0.2