Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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: [heur] Table through zero...strange

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67031] RE: [heur] [mg66988] Table through zero...strange
  • From: "Jaccard Florian" <Florian.Jaccard at he-arc.ch>
  • Date: Wed, 7 Jun 2006 05:10:14 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello !

Don't consider it as a problem!
The computer works in basis 2.

So for him : 

liste = Table[x, {x, -0.1, 0, 0.02}];

You can see the liste in basis 2 :

BaseForm[liste, 2]

And you will see that the last number, you expect to be 0, is -1*2^(-58), which is -3.46945 x 10^(-18).

If you don't want to see this details we could consider as enjoying, use Chop:

In[19]:=
Chop[liste]

Out[19]=
{-0.1, -0.08, -0.060000000000000005, -0.04000000000000001, 
  -0.020000000000000004, 0}  


Regards
 
F.Jaccard

-----Message d'origine-----
De : leptonic [mailto:leptonic at gmx.ch] 
Envoyé : mardi, 6. juin 2006 12:28
À : mathgroup at smc.vnet.net
Objet : [heur] [mg66988] Table through zero...strange

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.


  • Prev by Date: Re: Table through zero...strange
  • Next by Date: Two questions (1) Sollve and (2) Precision
  • Previous by thread: Re: Any ideas on expanded results for SetPartitions in discrete-combinatoria
  • Next by thread: Two questions (1) Sollve and (2) Precision