axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] exact quotient


From: Martin Rubey
Subject: Re: [Axiom-developer] exact quotient
Date: 21 Jun 2007 10:18:04 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Dear William,

> In[1]:=
> mon[n_,k_]:= Expand[(Random[Integer,k] x + Random[Integer,
> k]y)^n]
> 
> In[2]:=
> list[kappa_,m_]:=Table[mon[kappa, 10000], {i,1,m}]
> 
> In[3]:=
> test[kappa_,m_,n_]:=Module[{list1, list2, t1, t2, res},
>     list1=list[kappa, m];
>     list2=list[kappa,m];
>     res = {};
>     Do[t1 = AbsoluteTime[];
>            Do[list1[[i]] list2[[i]], {i,m}];
>            t2 = AbsoluteTime[];
>            res = Join[{{kappa, t2-t1}}, res],
>       {n}]; res]

When you write list1[[i]] list2[[i]] I'm not so sure whether the result is
actually computed.  Maybe you could retry with Expand[list1[[i]] list2[[i]]],
and maybe you should also store the result somewhere, so that the calculation
cannot be optimized away.

Many thanks,

Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]