MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Bug ???

Artur <grafix at> writes:

> 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
> Artur Jasinski, Poland
"k=0" in the first command is an assignment, ("k==0" would be a
comparison) whereas "k<1" is a comparison.


  • Prev by Date: Re: Help with solving ODE
  • Next by Date: Re: Bug ???
  • Previous by thread: Re: Bug ???
  • Next by thread: Re: Bug ???