converting a column to Float as excel

tri

New member
When using this BOX and converting a column to Float I I do not have the same results as Excel
 

Support

Administrator
Staff member
Hi Tri,
In the "data preview", the columns of type Float (on a blue background) are displayed using a maximum of 6 digits behind the decimal point (this corresponds to the display "% .6g" which is described here). In summary, Anatella tries to use up to 6 digits to display the number. The value of the number itself is saved in memory with the maximum of precision (ie digits) that a machine (ie a PC) is able to handle (ie it is ultra-precise: 1e-300).
WARNING! This box does not work in the same way as Excel: In Excel, you can change the display of a number (ie reduce the number of decimals displayed) while not "touching" the actual value of the number in question. On the contrary, in Anatella, after using the "numberFormatter" box (shown in the screenshot above), the number is actually "truncated" (ie the value of the number is changed: It's not just the display that changes ).

triforum.png


In general, I use the "numberFormatter" box just before exporting my numbers in text format or in .xlsx format. In this way, all the calculations made by Anatella are made with the maximum possible accuracy on the machine (1e-300) and it's just at the last step, at the end, that I lose precision at the moment I "truncates" (2 digits) the digits with the box "numberFormatter".
 

tri

New member
As you said, it remembers the whole number. After the operations when I change back to STRING, the number appears in its entirety; correct?
 

Support

Administrator
Staff member
Yes.
To be sure to see the whole number (after conversion to string), use "%.16g" when converting:

triforum2.png


More details (with examples) on page 235 of "AnatellaQuickGuide.pdf".
 
Top