Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenTue, 29 May 2018 20:11:47 +0200Decimal precision - how to have 18 decimals?https://ask.libreoffice.org/en/question/156399/decimal-precision-how-to-have-18-decimals/ Hello, I am inputting numbers that have 18 decimals. For example :
0.041345058938493747
Default settings seem to round up this number and save it as:
0.0413450589384938
I have tried to use the Format... dialog to increase precision, but it still rounds it up to 16 decimals:
0.041345058938493800
So...? How do I increase precision? Thanks in advance!!!Tue, 29 May 2018 19:27:28 +0200https://ask.libreoffice.org/en/question/156399/decimal-precision-how-to-have-18-decimals/Answer by cloph for <p>Hello, I am inputting numbers that have 18 decimals. For example :
0.041345058938493747</p>
<p>Default settings seem to round up this number and save it as:
0.0413450589384938</p>
<p>I have tried to use the Format... dialog to increase precision, but it still rounds it up to 16 decimals:
0.041345058938493800</p>
<p>So...? How do I increase precision? Thanks in advance!!!</p>
https://ask.libreoffice.org/en/question/156399/decimal-precision-how-to-have-18-decimals/?answer=156401#post-id-156401You can't. LibreOffice uses IEEE 754 representation of the numbers, and that just doesn't offer that level of precision.
see also https://ask.libreoffice.org/en/question/111735/column-has-been-defined-as-a-decimal-type-the-max-length-is-19-characters-with-15-decimal-places/
and general description of the way precision works in IEEE 754 here:
https://en.wikipedia.org/wiki/Numeric_precision_in_Microsoft_Excel
If you want to store the values in a spreadsheet, you have to do so as text (enter them by prefixing them with a single quotation mark, that will force the input to text)Tue, 29 May 2018 20:11:47 +0200https://ask.libreoffice.org/en/question/156399/decimal-precision-how-to-have-18-decimals/?answer=156401#post-id-156401