Bug 77951 - FORMATTING: Enhancement Request - Specify number of significant figures, not just decimal places.
Summary: FORMATTING: Enhancement Request - Specify number of significant figures, not ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.3.2 release
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval
Depends on:
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2014-04-25 23:33 UTC by DF
Modified: 2020-11-01 10:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Examples of significant figures and rounding (30.85 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-09-01 01:00 UTC, DF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DF 2014-04-25 23:33:20 UTC
Have the option to display a specified number of significant figures instead of number of decimal places. And carry it forward in calculations. For example one may input a list of data (ex 120, 34.567, 0.890) and want to display all of them with the same number of significant figures (say 3). This would require changing the number of decimal places for each cell which is impractical for large datasets. This could be extended to calculations where adding or multiplying figures would output a value with the correct number of significant figures (ex 0.10 * 10. = 1.0)

This enhancement would be useful for scientific data where significant figures are important and need to be tracked.

related enhancement: 77834
Comment 1 DF 2014-04-25 23:40:11 UTC
related enhancement: bug# 77834
Comment 2 m_a_riosv 2014-04-26 21:07:05 UTC
Hi DF, maybe the option in:
Menu/Tools/Options/LibreOffice calc/Calculate/General Calculations - Precision as shown, is not what you want, but can help a bit.
Comment 3 Jean-Baptiste Faure 2014-06-22 20:29:08 UTC
Hi DF,

Did you try the scientific format for numbers ? For me it does what you want.

Set status to NEEDINFO. Please set it back to UNCONFIRMED once you provided the requested informations. Thank you for your understanding.

Best regards. JBF
Comment 4 DF 2014-06-23 18:26:19 UTC
Jean-Baptiste Faure, the scientific format is scientific notation and it so happens the nature of it allows it work as I like however is a different formatting and not particularily asthetically pleasing or practical for modest numbers ex 123 vs 1.23E+2. I would like to keep precision while also keeping the standard formatting.

m.a.riosv, thanks but the 'precision as shown' appears to be for calculations, not formatting. It performs the calculations based on the precision shown and not the exact value and thus would be prone to rounding errors for multiple consecutive calculations. Im merely looking for a formatting option which properly displays a desired number of significant figures (not decimal places) and carries the formatting forward in calculations instead of having to do it manually.
Comment 5 Jean-Baptiste Faure 2014-06-28 18:22:39 UTC
I think it is a false good idea because in some case there is no valid display. For example with data like 120, 34.567 and 0.000890, if you want 3 significant digit you will get 120, 34.5 and 0.00 which does not render the data correctly.

I agree that the scientific formatting suffers of aesthetic drawbacks but it is always correct.

So I suggest to close this enhancement request as WontFix.

Best regards. JBF
Comment 6 DF 2014-07-01 18:03:42 UTC
For the last numeric example, 0.000890 is already 3 significant figures, and yes 0.00 is meaningless. From left to right, you start counting your figures from the first non-zero. Leading zeros don't count.

Significant figures are an integral part in taking measurements hence why it is drilled into undergraduate science students (and likely engineers) and is ubiquitous in research. This is not an enhancement which I thought up overnight, I've been finding the lack of this feature a nuisance for years and found it to be void of all spreadsheet software I've tried sofar (and I've looked). I think it would make a great addition for productivity. I've consulted others (who use Excel) and agreed this would be a useful feature.

A quick search shows me this is a commonplace, and there is no solution other than workarounds such as using scientific notation, or using a formula.
http://spreadsheetpage.com/index.php/tip/rounding_to_n_significant_digits/
http://www.eng-tips.com/viewthread.cfm?qid=231129
https://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=25658
http://www.faculty.umassd.edu/michele.mandrioli/172cbook/fCHM1.B.3.html
I've looked extensively through feature requests too, and found none.

As for implementing it, it would likely be an option between displaying specified number of decimal places or significant figures.
Comment 7 Joel Madero 2014-07-16 20:51:29 UTC
Another fine request.

New
Enhancement
Low - for most users they'll not see this as a hurdle.

Might be relatively easy to add, requesting input.
Comment 8 kie000 2015-08-31 13:15:49 UTC
"Another fine request. New Enhancement Low - for most users they'll not see this as a hurdle. Might be relatively easy to add, requesting input."

By that measure you might as well give up and go home.

And, I am a 'most users' I want this feature, it's a royal pain to have to keep fiddling with decimal places.
Comment 9 DF 2015-08-31 21:43:52 UTC
I most certainly think this enhancement should be considered at least medium if not high priority. I went through undergraduate university and this was one of the first things I found to be very clunky in all spreadsheet software and having this feature would be a significant time saver and would benefit most of the research area and the students. I've had to go through tables of data I've entered and manually fix numbers. I've checked online and currently the best solution in either this or Excel is to use a formula. Another field where this would stand out is for anyone who wants to round numbers such as turning raw data into user friendly (presentable). For example in finance or statistics one would prefer to to present all their data to two sig figs for aesthetics (eg 1,342,554 becomes 1,300,000).

Just to give some kind of insight on the impact, about 20% of students are in math, sciences and engineering for 16 countries. In Canada for example, there are about 1M undergraduates. So I'd think it would be safe to say at least 3% of the first-world population per year would likely find this feature to be of benefit in their spreadsheet software of choice.

I should mention that significant figures also applies to non-decimal numbers which is just as important as decimals. For example 123456 with 3 sig figs would be 123000 or if someone divides 1100/3.0 the result should be shown as 370 not 367 or 366.667, but it is important not to round anything other than visually so as not to incorporate rounding errors into subsequent calculations.

Another important part of significant figures is the rounding rules (see https://en.wikipedia.org/wiki/Rounding) There would have to be a few options for cases where the first non-significant figure is a 5. Normally one would round up (ex 1.25 to 2 sig figs becomes 1.3) but there are also cases where one may not want to round or and the case of 'round half to even'.
Comment 10 Joel Madero 2015-08-31 21:47:39 UTC
My last post on the issue - all in all it makes no difference as to how it's marked. In order for this to be implemented a volunteer will have to find it to be interesting - even if it was marked at "highest", it likely would not be implemented tomorrow, next week, next month, or maybe even next year. It is QA's responsibility to objectively prioritize enhancements. Asking for it to be bumped over and over again (or changing it yourself) is not the way to get the issue resolved/implemented.

If you *really* want another opinion (despite in reality it having no impact on when/if the enhancement is implemented) I suggest emailing the QA list and asking for a second opinion from an experienced QA member.
Comment 11 m_a_riosv 2015-08-31 22:50:10 UTC
Could someone attach a sample file with a column with the initial data, second one how they must be rounded an a third on how must be showed, sorry but not too much clear for me.
Comment 12 DF 2015-09-01 01:00:44 UTC
Created attachment 118304 [details]
Examples of significant figures and rounding

Significant figures could be seen as a method of rounding for the purposes of signifying accuracy. It does take some time to understand it well and students are given lots of practice. There are lots of explanations on the web but here's one nice one I've found: http://tournas.rice.edu/website/documents/SignificantFigureRules1.pdf I've also attached a spreadsheet of some examples.
Comment 13 Robinson Tryon (qubit) 2015-12-13 11:20:55 UTC Comment hidden (obsolete)
Comment 14 b. 2020-11-01 10:02:42 UTC
for not to slip away in time ... imho a good idea, supporting the request, 

may be not absolutely easy, to have e.g. 834500 formatted as 'three significant' (835000) while keeping! the exact input would require to store the significance information in an additional field ...