Are floating point settings (some low level flags???)
subtly different for Sage's Python and Sage itself? Namely, the same code succeeds or fails, depending on whether
it is invoked in Sage's Python, or in Sage proper (with preparser(False)).
It is an iterative procedure (call to solvers.sdp() below) that for first few steps behaves identically, but then there is divergence - it completes correctly in Python, but fails, after many
iterations, in Sage. I can only reproduce it on a Xeon machine running Gentoo Linux (the sage4 patchbot at U.Ghent). This was 1st uncovered while
testing #16929.
Here is the complete code (in Sage you also need preparser(False) first).
################################
from cvxopt import matrix, solvers
c = matrix([1.,-1.])
G = [ matrix([[1., 2., 2., 3.], [3., 4., 4., 5.]]) ]
G += [ matrix([[1., 1., 1., 1.], [2., 2., 2., 2.]]) ]
G += [ matrix([[-1.], [0.]]) ]
G += [ matrix([[0.], [-1.]]) ]
h = [ matrix([[5., 6.], [6., 7.]]) ]
h += [ matrix([[3., 3.], [3., 3.]]) ]
h += [ matrix([[0.]]) ]
h += [ matrix([[0.]]) ]
sol = solvers.sdp(c, Gs=G, hs=h)
print(sol['x'])
##################################
# in sage I get 'Terminated (maximum number of iterations reached).' (after 100 iterations)
# in sage --python I get 'Optimal solution found.' (after 26 iterations)
# divergence happens around iteration 17 or 18
#
Thanks,
Dima