MathGroup Archive 2006

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

Search the Archive

Re: Table through zero...strange

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67011] Re: Table through zero...strange
  • From: "David W.Cantrell" <DWCantrell at sigmaxi.org>
  • Date: Wed, 7 Jun 2006 05:09:07 -0400 (EDT)
  • References: <e63mqt$kqd$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"leptonic" <leptonic at gmx.ch> wrote:
> Hello,
>
> When i type in Mathematica (version 4) Table[x, {x, -0.1, 0, 0.02}]
>
> it gives me {-0.1, -0.08, -0.06, -0.04, -0.02, -3.46945 x 10-18]}


Just use exact, instead of approximate, numbers:

In[47]:= Table[x, {x, -1/10, 0, 2/100}]

Out[47]= {-1/10, -2/25, -3/50, -1/25, -1/50, 0}

In[48]:= N[%]

Out[48]= {-0.1, -0.08, -0.06, -0.04, -0.02, 0.}

David


> but for example Table[x, {x, -0.1, 0, 0.05}] will give a reasonable
> {-0.1, -0.05, 0.}.
>
> Probably a very stupid question but i can't figure out why the zero
> makes problem.
>
> Thanks for any help.


  • Prev by Date: Re: Table through zero...strange
  • Next by Date: Re: Table through zero...strange
  • Previous by thread: Re: Table through zero...strange
  • Next by thread: Re: Table through zero...strange