[sage-support] Binary variables in Integer Programs solved with CPLEX have wrong bounds

2013-12-14 Thread Stephen Hartke
It seems that Integer Programs solved with CPLEX sometimes have the wrong bounds on binary variables. For instance, p=MixedIntegerLinearProgram(solver=CPLEX) x=p.new_variable(dim=1) #,binary=True) p.add_constraint(x[0]+x[1]==2) p.set_objective(None) p.set_binary(x) p.show() p.solve() print

[sage-support] Re: Spurious numerical solutions of polynomial equation

2013-12-14 Thread JamesHDavenport
Curious. The polynomial does not seem particularly ill-conditioned, in the sense that its discriminat is roughly what one might expect (unlike, say, Wilkinson's). Maple gives 50 roots with |f(x)|10^{-12}, and one with f(x)=, i.e. much larger. On Thursday, 12 December 2013 15:35:53 UTC, AWWQUB

[sage-support] Re: Spurious numerical solutions of polynomial equation

2013-12-14 Thread Volker Braun
Apparently you need about 65 bits of accuracy, presumably maxima uses doubles (=53 bits). Compare: sage: eq = (I*x^51+sum(x^k,k,0,50)).subs(x=x-1-I) sage: var('x, k') (x, k) sage: eq = (I*x^51+sum(x^k,k,0,50)).subs(x=x-1-I) sage: sol = eq.polynomial(ComplexField(65)).roots() sage:

[sage-support] Re: Spurious numerical solutions of polynomial equation

2013-12-14 Thread JamesHDavenport
Sorry - I was looking at the original *(I*x^51+sum(x^k,k,0,50))==0.* Note that if you make the x-x-1 substitution, the polynomial now has coefficient as large as 10^18. The discriminant is unchanged, but the value you would expect it to be, given the size of the coefficient, is roughly10^800

[sage-support] Possible problem in delsarte_bound_hamming_space

2013-12-14 Thread Peter Mueller
The function delsarte_bound_hamming_space(n, d, q, isinteger=False, return_data=False, solver='PPL') offers the option isinteger=True. As the doc doesn't tell it, I got a little curious what is assumed to be integral. Looking at the implementation it turns out that the distance distribution is

[sage-support] Re: Possible problem in delsarte_bound_hamming_space

2013-12-14 Thread P Purkayastha
On 12/15/2013 06:46 AM, Peter Mueller wrote: The function delsarte_bound_hamming_space(n, d, q, isinteger=False, return_data=False, solver='PPL') offers the option isinteger=True. As the doc doesn't tell it, I got a little curious what is assumed to be integral. Looking at the implementation it