Reading float values without losing the precision : <p>I have a dataset ((12008 * 12008) matrix stored as csv format ) containing floating-point numeric values such as:</p>

<pre><code>0.00000000000000000129097521168892,0.00000822381709160264,-0.0000202130952444797,-0.0000242966927641499,0.000030546233920949,0.0000371753288365733,-0.00000425477255333099,0.0000417806937053693,-0.0000108963812606789,-0.0000116825931954974,0.00000630880107874073,-0.0000148294201214316,0.000015379692507603,0.00000188679818192867,0.00000244261959932239,-0.00000000000000000151132910441927,-0.0000219241408193178,0.000017429377110585,0.00000870784208574737,0.0000364006097348257,0.0000113488247245831,0.000000061277075989572,0.00000139732542828701,0.000000106947553933263,0.0000326417023213338,0.000000461629854407632,0.0000154355086839126,-0.00000952557006126632,-0.00000661974638741755,0.0000100492673229086,-0.00000234761929597247,0.000000562031028984242,-0.0000111189586356939,0.0000147613296909272,-0.0000412808264307332,0.0000144980218289582,-0.00000396573532860471,0.00000284216015813941,-0.000000340292198448977,0.000000000000000000673559708847384,-0.000000000000000000477244282125147,0.0000295672329145256,0.000000265057585538249,-0.0000259880981140332,-0.000000655572300400449,0.0000275203484322834,0.00000939709816031401,-0.000000722013848489603,-0.000000131975990695569,-0.0000305715257167805,0.0000166359409438876,-0.0000108549024616569,0.0000035413589251256,0.0000134733827428785,0.00000033136969072632,-0.0000000227012317723535,0.0000251344669810146,0.00000507204772254958,-0.00000000193093573409854,
</code></pre>

<p>I noticed when I read it to a float buffer, I lose the precision too much so I get something like:</p>

<pre><code>0.0000000
-0.000082
</code></pre>

<p>I want to read the exact values from the dataset <strong>without losing the precision</strong> to a buffer in my program. I use the following small program to read but I am not sure how to modify it so that it does not lose the precision:</p>

<pre><code>float *data = malloc((12008 * 12008) * sizeof(float));
FILE *fp ;
fp=fopen("./eig_matrix.csv","rb");
if(fp!= NULL) fread(data, (12008 * 12008)*sizeof(float),1,fp);
fclose(fp);
</code></pre>
