# Import numerical data without truncation

**URL:** <https://community.wolfram.com/t/import-numerical-data-without-truncation/15243>\
**Category:** Questions\
**Tags:** mathematica, external-interfaces, import-and-export\
**Created:** [January 14, 2020, 11:38pm UTC](https://community.wolfram.com/t/import-numerical-data-without-truncation/15243 "2020-01-14T23:38:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhalpern](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@dhalpern](https://community.wolfram.com/u/dhalpern)\
**Post date:** [January 14, 2020, 11:38pm UTC](https://community.wolfram.com/t/import-numerical-data-without-truncation/15243/1 "2020-01-14T23:38:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [January 14, 2020, 11:44pm UTC](https://community.wolfram.com/t/import-numerical-data-without-truncation/15243/2 "2020-01-14T23:44:49Z")

</div>

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[%]

```

---

<div class="post-metadata">

**Author:** ![dhalpern](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@dhalpern](https://community.wolfram.com/u/dhalpern)\
**Post date:** [January 15, 2020, 5:39pm UTC](https://community.wolfram.com/t/import-numerical-data-without-truncation/15243/3 "2020-01-15T17:39:59Z")

</div>

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”]  
(2) 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.

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [January 15, 2020, 6:21pm UTC](https://community.wolfram.com/t/import-numerical-data-without-truncation/15243/4 "2020-01-15T18:21:59Z")

</div>

Hi David,

Take a look at [this post](https://mathematica.stackexchange.com/q/3736/58370) on MSE for an explanation.

---

<div class="post-metadata">

**Author:** ![sghuisman](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/sghuisman/32/27850_2.png) [@sghuisman](https://community.wolfram.com/u/sghuisman)\
**Post date:** [January 15, 2020, 7:04pm UTC](https://community.wolfram.com/t/import-numerical-data-without-truncation/15243/5 "2020-01-15T19:04:06Z")

</div>

Again, it is just **SHOWING** 6 digits for a machine number. Under the **Preferences =\> Appearance =\> Formatting =\> Numbers** you can set the number of digits, displayed by default.
