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 ?
ToExpression[StringReplace[nums, "E" -> "*10^"]]
on that list. However,ReadList[...,Number]
should handle the Fortran style. $\endgroup$ – ciao Apr 5 '14 at 6:27ReadList["abc.dat", Real]
appears to work correctly, yielding:{6.32974339429986413842620080104840*10^-8, -0.0000254959851559626153977549441655316, -0.0000407099633836181102881717011448444}
. What output do you get? $\endgroup$ – Mr.Wizard Apr 5 '14 at 6:53