23 #include "CoinHelperFunctions.hpp"
24 #include "CoinFinite.hpp"
26 using namespace Couenne;
67 if (
issignpower_ || ((isInt || isInvInt) && (rndexp % 2) && (rndexp > 0))) {
93 else if (isInt || isInvInt) {
105 if (isInt && !(rndexp % 2))
110 if (isInt || isInvInt) {
164 if (isInt || isInvInt)
174 printf (
"exprPow::getBounds(): Warning, exponent not constant\n");
196 if (!isInt && (!isInvInt || !(intk % 2 ||
issignpower_))) {
200 if (lba < 0.) lba = 0.;
201 if (uba < 0.) uba = 0.;
209 }
else if (lba > 0) {
214 ub =
safe_pow (CoinMax (-lba, uba), k);
227 }
else if (lba > 0) {
231 lb =
safe_pow (CoinMax (-lba, uba), k);
240 }
else if (lba > 0) {
Power of an expression (binary operator), with constant.
exprPow(expression **al, int n=2, bool signpower=false)
Constructor.
virtual enum nodeType Type() const
Node type.
virtual void getBounds(expression *&, expression *&)
Get lower and upper bound of an expression (if any)
expression clone (points to another expression)
bool issignpower_
do we mean a signed power function: sign(arg0) * |arg0|^arg1 (assumes that arg1 is constant) ...
expression ** arglist_
argument list is an array of pointers to other expressions
double CouNumber
main number type in Couenne
CouNumber safe_pow(CouNumber base, CouNumber exponent, bool signpower=false)
compute power and check for integer-and-odd inverse exponent
virtual CouNumber Value() const
value (empty)