0

Now, I have a data file (abc.dat) and it includes many long-Fortran-like numerical numbers as follows,

 6.329743394299864138426200801048403E-0008
-2.549598515596261539775494416553164E-0005
-4.070996338361811028817170114484442E-0005

How to read these data in Mathematica? If we use ReadList["abc.dat",Real] and it is not available for these long numbers. If we use ReadList["abc.dat", Record], then we need to find a way to change the string to numbers. Is there some better way for dealing with this problem ?

Orders
  • 1,247
  • 11
  • 20

1 Answers1

1

I opened HxD and pasted your numbers and saved as abc.dat. Then this worked for (8.0.4.0):

Import["C:\\f1\\f2\\Desktop\\abc.dat"]
(*{{6.32974339429986413842620080104840\[CenterDot]10^-8},{-0.0000254959851559626153977549441655316},{-0.0000407099633836181102881717011448444}}*)
Coolwater
  • 20,257
  • 3
  • 35
  • 64
  • Incidentally in version 7 Import does not work fully here: data is imported as machine reals, losing input precision. – Mr.Wizard Apr 05 '14 at 06:59