We are given the primal-dual pair of problems

Min c'x

st. x in K

Ax = b

Max b'y

st. z in K

A^T y + z = c

The best way to measure the error of a solution pair ( x, (y,z) ) is calculating

i) the violation of the affine constraints normalized:

norm(Ax - b)/(1+max(abs(b))), norm(A^T y + z - c)(1+max(abs(c)))

ii) the violation of the conic constraints:

For this purpose, we suggest computing min(eigK(x)) and min(eigK(z))
by using Sedumi's eigK function.

iii) Some codes do not explicitly maintain z. In this case,
one should set

s = c - A^T y

Of course, then the violation as in i) will be zero (depending on the accuracy achieved by the computer). Finally, the duality gap:

max(0, c'*x - b'*y)

** **
To make all error computations consistent, please use the

- Euclidean norms on vectors and
- Frobenius norms on matrices (which are then consistent).

that uses the largest singular value of a matrix, which will be considerably

smaller than its Frobenius norm.

Many thanks to Mike Todd for pointing this out.