Question: Problems with my interface(displayprecision=3)

Hello,

It is obvious why my command

interface(precision=3) 

is not working?. I get 10 decimals(commands below and output in attached file).

I hope it is easy to fix.

 

Kindest regardsSSSzzzz

 

Jean-Jacques



restart:
f1 :=  (w1, w2,n) -> add(add(
 `if` (1/2 <= w1+j*w2+((1/n)*(1-w1-w2))*k and
j*w2 +((1/n)*(1-w1-w2))*k < 1/2 ,
(1/((n+1)*(n+2)))*factorial(k+j)*factorial(n+1-j-k)/(factorial(k)*factorial(n-k)), 0),
k = 0 .. n), j = 0 .. 1) :

w1:=3/9:
w2:= 2/9:
alpha1:= 1-w1-w2:

interface(rtablesize=100,displayprecision=3):
tableau:= Matrix(  [ seq ( [n, evalf(alpha1/n) , evalf( f1(w1,w2,n)  ), evalf(  f1(w2,w1,n)) , evalf( 1-f1(w1,w2,n)-f1(w2,w1,n ))/n     ,evalf( 1-f1(w1,w2,n)-f1(w2,w1,n )), evalf( f1(w1,w2,n)/w1  ), evalf( f1(w2,w1,n)/w2  ),   evalf( 1-f1(w1,w2,n)-f1(w2,w1,n ))/alpha1     ], n={1,2,3,4,5,6,7,8,9,10})]);
latex(evalf(tableau,3));


 



Download Displayprecision.mw

Please Wait...