File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) 2014: Madeleine Udell and contributors
2+ #
3+ # Use of this source code is governed by a BSD-style license that can be found
4+ # in the LICENSE file or at https://opensource.org/license/bsd-2-clause
5+
6+ Base. log1p (x:: AbstractExpr ) = log (1 + x)
Original file line number Diff line number Diff line change @@ -2272,6 +2272,20 @@ function test_inner_product()
22722272 return
22732273end
22742274
2275+ # ## reformulations/log1p
2276+
2277+ function test_log1p ()
2278+ target = """
2279+ variables: t, x
2280+ minobjective: 1.0 * t + 0.0
2281+ [1.0 * t, 1.0, 1.0 * x + 1.0] in ExponentialCone()
2282+ """
2283+ _test_reformulation (target) do context
2284+ return log1p (Variable (1 ))
2285+ end
2286+ return
2287+ end
2288+
22752289# ## reformulations/norm
22762290
22772291function test_norm ()
You can’t perform that action at this time.
0 commit comments