MathGroup Archive 2001

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

Search the Archive

Export table problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30891] Export table problem
  • From: maarten.vanderburgt at icos.be
  • Date: Sun, 23 Sep 2001 02:16:31 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hallo,

Below I generate a table of numbers, which I round to get numbers with 2
decimals precision. I want to export them in a ascii file. In my output
file I get some numbers like  1.4000000000000001 instead of simply 1.4.
Where does this extra  0.0000000000000001 come from? Is this a bug? How can
I get rid of it without editing my file.?

Thanks for your help

Maarten van der Burgt
Belgium

Round[100*Table[{i,i/5,i/3},{i,1,20}]]/100.;
Export["c:\\temp\\table.txt",%,"Table"]

When I open  table.txt I see:
1.    0.2                  0.33
2.    0.4                  0.67
3.    0.6                  1.
4.    0.8                  1.33
5.    1.                   1.67
6.    1.2                  2.
7.    1.4000000000000001   2.33
8.    1.6                  2.67
9.    1.8                  3.
10.   2.                   3.33
11.   2.2                  3.67
12.   2.4                  4.
13.   2.6                  4.33
14.   2.8000000000000003   4.67
15.   3.                   5.
16.   3.2                  5.33
17.   3.4                  5.67
18.   3.6                  6.
19.   3.8000000000000003   6.33
20.   4.                   6.67



  • Prev by Date: Re: Page preview and graphic size
  • Next by Date: Oh Where, Oh Where Have My Values Gone?
  • Previous by thread: How Download an additional package?
  • Next by thread: Re: Export table problem