August 7th, 2006, 10:05 am
Perhaps solve it without integer programming.x/y = -P2/P1Find a rational approximation for P2/P1. The problem is that you can let x and y have arbitrary numbers of digits when P2/P1 is irrational. When do you stop? You will need to specify a precision.In Mathematica, you could use Rationalize[P2/P1, 1E-10] Eg P1 = 1, P2 = -pi => x = 312689, y = 99532BM