# Import numerical data without truncation

Posted 1 month ago
333 Views
|
4 Replies
|
1 Total Likes
|
 Hi, I have a data file consisting of 4 columns with floating numbers generated by a C program, with each number given to 16 significant digits. I've used the Import command and also ReadList to import this data to a Mathematica notebook: data=Import["file.dat"] or ReadList["file.dat",{Number,Number,Number,Number}]. Either way, Mathematica is only importing the first 6 significant digits of each number. Is there a way around this so that all the significant digits are read? Thanks.David Halpern
4 Replies
Sort By:
Posted 1 month ago
 From what I read I think you are actually do import all significant bits, but Mathematica only shows the first 6 by default. You can check by: Pi // N FullForm[%] 
Posted 1 month ago
 Thanks for the response but I still don't quite understand what is happening.Here is what I do. (1) I import a matrix A using A=Import"data.dat" If I type A[[1,2]] I get 0.992745. (3) If Itype N[A[[1,2]],16]] I get exactly the same answer as in (2), which in my opinion is strange since the result should be given to 16 digit precision. However, if I use the FullForm command, I get all the digits 0.99274468827 that were stored in the file data.dat.