Description: Default scientific format is set to "0.00E+000" which is necessary for numbers higher than 1E100. These numbers almost do not exist in "real" life. Steps to reproduce: 1. Enter a value in a cell 2. Click on button "Number format: Exponential" or hit Ctrl+Shift+2 Actual behavior: Value is formated with "0.00E+000" Expectd behavior: Useless '0' in exponential part should be removed, as it is very unlikely that a "real" calculation gives a results higher than 1E100. See https://en.wikipedia.org/wiki/Googol Default scientific format should be "0.00E+00" or even "0.00E+0" as LibO will add all necessary figures in exponent.
Default scientific format is hard coded for each locale in http://opengrok.libreoffice.org/xref/core/i18npool/source/localedata/data/ For instance, for en_US.xml change <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7"> <FormatCode>0.00E+00</FormatCode> to <FormatElement msgid="ScientificFormatskey1" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> <FormatElement msgid="ScientificFormatskey2" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7"> <FormatCode>0.00E+00</FormatCode> But this does not apply to General format
(In reply to Laurent BP from comment #0) > Description: Default scientific format is set to "0.00E+000" > ... > Expectd behavior: > Useless '0' in exponential part should be removed, as it is very unlikely > that a "real" calculation gives a results higher than 1E100. > > Default scientific format should be "0.00E+00" or even "0.00E+0" Perhaps this is set up so that exponents will align properly in columns? e.g. would you rather see: 8.29E+51 4.51E+5 1.28E+12 or 8.29E+51 4.51E+05 1.28E+12 ? Summary -> (less -> fewer, for a countable noun)
Hi Robinson, Thanks for your concern. For my personal use, I would prefer fewer digits (0.00E+0) because I do not use a fixed font, so even with 0.00E+00, there will be no alignment. However, I noticed that modifying default settings from 0.00E+000 to 0.00E+00 would be very easy as this format already exists (see comment 2): just need to modify all locale files in i18npool/source/localedata/data/ However, 0.00E+0 would required to create a new format in the format list which would require more efforts. In all cases, "General" (standard) format will need to follow the new default format. And thanks for correcting my poor English ;)
@adolfo: I noticed you just changed status to ASSIGNED. However, in the same time I have submitted a patch to modify General format. See https://gerrit.libreoffice.org/#/c/14562/ and https://gerrit.libreoffice.org/#/c/14563/ That's why I assigned the bug to myself. Did you intend to take it?
(In reply to Laurent BP from comment #4) > Did you intend to take it? No, I just forgot to add you to the Assigned field. Sorry about that!
I think defaulting to two digits in the exponent for the General format is fine, but I'm not convinced of the idea to omit up to two 0s, for following reasons: * As Robinson mentioned, it may make numbers "jump around" IF you use a fixed font. That Laurent personally doesn't use a fixed font is no argument here ;-) * Especially the range E-9 to E-12 is fairly often used for nano and pico, seeing E-09 and E-12 in one column instead of E-9 and E-12 is certainly more pleasing to the eye. Same for E+9 and E+12 Giga and Tera. * Also Excel has minimum two digits in the exponent. If anyone wants to really have only one digit in the exponent there is always the possibility to define and apply a number format like 0.0E+0 or even 0.0E0 if you like it even shorter.
@Eike: OK. I'm on the way to limit to two digits, and not one.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cc8a2d00387d554cd4d694503dd25fa8f950a78f tdf#88835 Calc: General format: 2 digits in exponent It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=407733158220ada48ff66768f218bbc9bdb51098 tdf#88835 2 digits in exponent for default scientific format It will be available in 5.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=afd8e4093687557843427d7539c4b0e6ece8bbff both scientific formats are of type medium, tdf#88835 follow-up It will be available in 5.0.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.