Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Table through zero...strange

  • To: mathgroup at
  • Subject: [mg67037] Re: Table through zero...strange
  • From: David Bailey <dave at>
  • Date: Wed, 7 Jun 2006 05:10:30 -0400 (EDT)
  • References: <e63mqt$kqd$>
  • Sender: owner-wri-mathgroup at

leptonic 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]}
> 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.
Floating point numbers are usually not exact - so this result is not 
surprising. In fact, by default floating point numbers are stored at 
machine precision using 64-bit floating point. This is a binary format, 
so numbers that are not of the form a*2^n (a and n integer) can never be 

The following is a more reliable way to specify such an iteration:


David Bailey

  • Prev by Date: RE: Table through zero...strange
  • Next by Date: RE: [heur] Table through zero...strange
  • Previous by thread: RE: Table through zero...strange
  • Next by thread: Re: Table through zero...strange