I am solving my problem with LinearProgramming. In certain cases, my coefficients that are fed into the function come from evaluating trigonometric functions, $\sin(\frac{\pi}{N})$ or $\sin^2(\frac{\pi}{N})$ for different $N$. Their values are problematic for the solver, for example the Interior Point Method gives the following warnings:

Min::meprec: Internal precision limit \$MaxExtraPrecision = 500.` reached while evaluating 1/2-Sin[π/8]^2+1/2 (-1+2 Sin[π/8]^2).

The solution is produced at the end but as the effect of the machine precision arithmetic. I need to obtain exact solutions. There is the same problem with the Simplex method. I have constraints which are equalities and it is necessary to solve the problem exactly.

Are there any numerical tricks or Mathematica options that would handle these irrational numbers?


  • 1
    $\begingroup$ It might be perilously slow, but with Method -> Simplex I believe one can set WorkingPrecision -> Infinity. Even so, this will not fully address the issue of failure to recognize zero. $\endgroup$ – Daniel Lichtblau Apr 27 '17 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.