<div dir="ltr">Hi,<div>I&#39;m testing a network flow problem but encounter a float-point headache. The output is something like the following:</div><div><div>&quot;~/MultiCommodityFlowTest.cpp:444: Failure</div><div>Value of: linkMap.at(make_pair(0, 3))</div><div>  Actual: 9.9986685597741598e-13</div><div>Expected: 0</div></div><div>&quot;</div><div>Previously, I used glpk and nothing is wrong when using google unit test(EXPECT_EQ). But Clp still has a couple of floating-point numbers failures s even I use EXPECT_DOUBLE_EQ or EXPECT_FLOAT_EQ. </div><div>I think the reason is that glpk uses some default post-processing method to handle the value of variable in solution, but Clp doesn&#39;t have this process. </div><div>Is there a way that Clp can round the solution to a reasonable value rather than the above value? </div><div><br></div><div>Thanks,</div><div>Emer</div><div><br></div><div>p.s. Thanks John for the last reply, I have changed the way to build a constraint matrix from glpk to Clp, and it works better than the former. </div></div>