How can I define working precision for each variable individually
for example:
Maximize[x y< 100, {x, y}]
where the working precisions for x
and y
should be 2
and 7
respectively.
Say x
is some real life quantity that is ONLY available to 2 decimal places and we need y
to be as precise as possible (say 7 decimal places) regardless of the precision of xy
. How can I do this in Mathematica?
here is exact problem
Maximize hsum + isum + jsum + ksum + lsum + msum + nsum + osum
constraints are:
0 < hsum,isum,jsum,ksum,lsum,msum,nsum < 10000
-5000 < osum < 0
a*x1 + b*x2 + d*x4 - h*(x1 + x2 + x4) = hsum
a*x1 + b*x2 + d*x4 - i*(x1 + x2 + x4) = isum
a*x1 + b*x2 + e*x5 - j*(x1 + x2 + x5) = jsum
a*x1 + b*x2 + e*x5 - k*(x1 + x2 + x5) = ksum
a*x1 + c*x3 + f*x6 - l*(x1 + x3 + x6) = lsum
a*x1 + c*x3 + f*x6 - m*(x1 + x3 + x6) = msum
a*x1 + c*x3 + g*x7 - n*(x1 + x3 + x7) = nsum
a*x1 + c*x3 + g*x7 - o*(x1 + x3 + x7) = osum
X1,X2,X3....X7 are integers
a=100
b = (a + u1) && c = (a - u2) && d = (b + u3) && e = (b - u4) &&
f = (c + u5) && g = (c - u6) && h = (d + u7) && i = (d - u8) &&
j = (e + u9) && k = (e - u10) && l = (f + u11) && M = (f - u12) &&
n = (g + u13) && o = (g - u14)
0.1 <= u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14 <= 3
in the above problem a
is 100
rest of the variables b,c,d,e,f,g,h,i,j,k,l,m,n,o
can be derived by adding or subtracting u1,u2,u3....u14
now i need to define that value of u must be upto 2 decimal places.
Also here is the link for the same https://mathematica.stackexchange.com/questions/27105/non-linear-constrained-interger-optimization (you can check out this one too!)
x
is some real life quantity that isONLY available upto 2 decimal places
and we needy
to be precise as much as possible,it doesn't no matter what is the precision result ofxy
$\endgroup$ – Michio kaku Jun 17 '13 at 16:08x
andy
easily. Working Precision determines how many decimal places are maintained for internal computation. If you wanty
to have a precision of 7, then useWorkingPrecision->7
. Your question is one of error propagation, not a Mathematica issue. $\endgroup$ – Corey Kelly Jun 17 '13 at 16:13x
is known, then you can'tMaximize
with respect to it, and the inequality lets you directly findy
. $\endgroup$ – Corey Kelly Jun 17 '13 at 16:27