|
[Date Index]
[Thread Index]
[Author Index]
Re: Bug ???
On Oct 3, 2007, at 6:34 AM, Artur wrote:
> Why doesn't work:
> a={};Do[k=n^2-(Floor[n^2(2/3)])^2;If[k=0,
> AppendTo[a,{k,n^2}]],{n,1,1000}];a
> but working
> a={};Do[k=n^2-(Floor[n^2(2/3)])^2;If[k<1,
> AppendTo[a,{k,n^2}]],{n,1,1000}];a
Equality is == not =, the If statement in your first expression is
not going to evaluate as you expect.
Regards,
Ssezi
Prev by Date:
Re: Bug ???
Next by Date:
Re: Bug ???
Previous by thread:
Bug ???
Next by thread:
RE: Bug ???
|