It's similar to floating point in general. If you have some computed number whose exact value should be

, the floating point number you actually get is not necessarily exactly

but rather is in some interval

for some (hopefully) small

.

Thus, when you are looking for a 0, you should consider anything close to 0 to be 0. The question then is how close is close enough? To deal with that, I printed out the

's from a few runs, and eyeballed them to get an idea of what a good

might be. That was good enough to get all of the problems right.

Alternatively, one of the items in the dictionary gp returns is named 'gap'. I do not understand CVXOPT well enough yet to be quite sure what the gap is, but it

*seems* to be a good candidate for

.