problem?

• To: mathgroup at smc.vnet.net
• Subject: [mg18605] problem?
• From: 965-T9214 Ayad Soufiane <daya at venus.algo.cs.kumamoto-u.ac.jp>
• Date: Tue, 13 Jul 1999 01:01:31 -0400
• Sender: owner-wri-mathgroup at wolfram.com

```I wrote this program for Mathematica 2.2 for SPARC and every thing was all
right, but  upgrading to Mathematica 3.0 the same program doesn't work, and its
giving me some fancy message
do you have any idea about what is the problem ?

Regards,

---------------
Listing of the Program
---------------

Print[StringForm["  App. Num.  "]];
Print[StringForm["========================================================"]];
For[ Split1=3, Split1 <5, Split1++,
g=2;
Beta1=1;
nmax=Split1*(g-1);
lng[x_]=Log[x]/Log[g];
Pr[i_]=lng[1+1/i];
c[Split1_]=lng[Split1+1];
Start[Split1_]=g^(c[Split1]);
End1[Split1_]=g^(c[Split1]+1)-1;
TableSize[Split1_]=End1[Split1]-Start[Split1]+1;
Ro[i_,N1_]=1/N1;
P[N1_,i_,j_]=Binomial[N1,j]*Pr[i]^(j)*(1-Pr[i])^(N1-j);
Alpha1[i_,j_,k_,N1_]=If[i-1>=j-1,If[N1-1>=k-1,If[N1-i>=k-j,Binomial[i-1,j-1]*Binomial[N1-i,k-j]/Binomial[N1-1,k-1],0],0],0];
Gamma1[k_,j_,N1_]=If[k>=j,Sum[Alpha1[i,j,k,N1]*Ro[i,N1],{i,j,N1}],0];
q[N1_,h_,Split1_]=Sum[Pr[Ba]*Gamma1[j,h,N1]*P[N1,Ba,j],{Ba,Start[Split1],End1[Split1]},{j,1,N1}];
S[N1_,Split1_]=Sum[h*q[N1,h,Split1],{h,1,N1}]/Sum[Pr[i]*P[N1,i,j],{i,Start[Split1],End1[Split1]},{j,1,N1}];
Print[StringForm[" "]];
Print[StringForm[" "]];
Print[StringForm[" "]];
Print[StringForm["-----------------------------------------------"]];
Print[StringForm["*                                             *"]];
Print[StringForm["*                  Num. App.                  *"]];
Print[StringForm["*                                             *"]];
Print[StringForm["-----------------------------------------------"]];
Print[StringForm[" "]];
Print[StringForm[" "]];
Print[StringForm["Growth Factor   g        :  "],g];
Print[StringForm["Beta                     :  "],Beta1];
Print[StringForm["Split Number             :  "],Split1];
Print[StringForm["Start File               :  "],N[Start[Split1]]];
Print[StringForm["End File                 :  "],N[End1[Split1]]];
Print[StringForm["Table Size               :  "],N[TableSize[Split1]]];
Print[StringForm["Average Search Cost S("],N[nmax],StringForm[") : "],N[S[nmax,Split1]]];
]

----------
Out-Put
----------

Mathematica 3.0 for HP-UX PA-RISC
Copyright 1988-97 Wolfram Research, Inc.
-- Motif graphics initialized --

In[1]:= App. Num.

In[2]:=
In[2]:= ========================================================

In[3]:=
In[3]:=
\$MaxExtraPrecision::meprec:
In increasing internal precision while attempting to evaluate
1 + Log[4]/Log[2]
Floor[-4 + 2                 ], the limit \$MaxExtraPrecision = 50.
was reached. Increasing the value of \$MaxExtraPrecision may help resolve
the uncertainty.

\$MaxExtraPrecision::meprec:
In increasing internal precision while attempting to evaluate
1 + Log[4]/Log[2]
Floor[-4 + 2                 ], the limit \$MaxExtraPrecision = 50.
was reached. Increasing the value of \$MaxExtraPrecision may help resolve
the uncertainty.

\$MaxExtraPrecision::meprec:
In increasing internal precision while attempting to evaluate
1 + Log[4]/Log[2]
Floor[-4 + 2                 ], the limit \$MaxExtraPrecision = 50.
was reached. Increasing the value of \$MaxExtraPrecision may help resolve
the uncertainty.

General::stop: Further output of \$MaxExtraPrecision::meprec
will be suppressed during this calculation.

-----------------------------------------------
*                                             *
*                  Num. App.                  *
*                                             *
-----------------------------------------------

Growth Factor   g        :  2
Beta                     :  1
Split Number             :  3
Start File               :  4.
End File                 :  7.
Table Size               :  4.
Load Factor      Alpha   :  0.75

1
Power::infy: Infinite expression - encountered.
0

Infinity::indet:
Indeterminate expression
1
Log[1 + -]
i  3
0 ComplexInfinity (Log[2] + <<1>>) <<1>> (1 - ----------)
Log[2]
---------------------------------------------------------- encountered.
1  2         1
Pi Log[2] (Log[2] - Log[1 + -])  Log[1 + -]
i            i
Average Search Cost S(3.) : Indeterminate

-----------------------------------------------
*                                             *
*                  Num. App.                  *
*                                             *
-----------------------------------------------

Growth Factor   g        :  2
Beta                     :  1
Split Number             :  4
Start File               :  5.
End File                 :  9.
Table Size               :  5.
Load Factor      Alpha   :  0.8

1
Power::infy: Infinite expression - encountered.
0

Infinity::indet:
Indeterminate expression
1
Log[1 + -]
i  4
0 ComplexInfinity (Log[2] + <<1>>) <<1>> (1 - ----------)
Log[2]
---------------------------------------------------------- encountered.
1  2         1
Pi Log[2] (Log[2] - Log[1 + -])  Log[1 + -]
i            i
Average Search Cost S(4.) : Indeterminate

In[4]:=
In[4]:=

```

• Prev by Date: Re: Character encoding with Display[]
• Next by Date: Re: Need a means to get arguments of a function
• Previous by thread: Re: Character encoding with Display[]
• Next by thread: [Q] Implementing identities as rules