[Coin-lpsolver] Error in ClpNonLinearCost::refreshCosts

librik at panix.com librik at panix.com
Mon Jul 31 00:09:03 EDT 2006


There's an error in line 6 of the method ClpNonLinearCost::refreshCosts
(in Clp/src/ClpNonLinearCost.cpp)

The line:
	if ((method_&1!=0)) {
is certainly not what you want.

Bitwise & has an unexpectedly low precedence, even lower than !=.

Parenthesize the line as follows:
	if ((method_&1)!=0) {
and the semantics will be what you expect.

- David Librik
librik at panix.com



More information about the Clp mailing list