[Solved] Precision as shown

Discuss the spreadsheet application
Post Reply
TheOldThug
Posts: 16
Joined: Fri Jun 12, 2020 3:03 pm

[Solved] Precision as shown

Post by TheOldThug »

I have a column of numbers with the numbers set to no decimal point. If the number is 7.5 it rounds to 8. However when I add the numbers in the column it adds them as 7.5 not 8. I believe if I have "Precision as shown" checked it fixes this problem. Is that correct and will it apply to all sheets or just the worksheet I am using. Also am I setting myself up for some type of problem.
Thank you
Last edited by TheOldThug on Thu Apr 25, 2024 3:08 pm, edited 1 time in total.
Open Office 4.1.7 on Windows 10
User avatar
robleyd
Moderator
Posts: 5092
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Precision as shown

Post by robleyd »

The HELP says
Precision as shown
Specifies whether to make calculations using the rounded values displayed in the sheet. Charts will be shown with the displayed values. If the Precision as shown option is not marked, the displayed numbers are rounded, but they are calculated internally using the non-rounded number.
That seems to match what you want? This is a global setting, using Tools | Options... so applies to all your spreadsheets in the document.
 Edit: to clarify 
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
Zizi64
Volunteer
Posts: 11365
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Precision as shown

Post by Zizi64 »

I have a column of numbers with the numbers set to no decimal point. If the number is 7.5 it rounds to 8.
They are not rounded numbers, but they are FORMATTED ones. The formatting feature never will change the value of the numbers. It will modify only the lookout of the numbers.

The option "Precision as shown" will modify the "value" of the numbers of the cells what will used to other calculations, but when you switch it off, the Calc will remember the original values. The scope of this option is global.

If you want round the numbers partially (in some cells only), then you must use the function ROUND() and others.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
keme
Volunteer
Posts: 3706
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Precision as shown

Post by keme »

TheOldThug wrote: Thu Apr 25, 2024 4:47 am I have a column of numbers with the numbers set to no decimal point. If the number is 7.5 it rounds to 8. However when I add the numbers in the column it adds them as 7.5 not 8. I believe if I have "Precision as shown" checked it fixes this problem. Is that correct and will it apply to all sheets or just the worksheet I am using.
The setting in question is "global" in that it applies to all worksheets (tabs) in your current file, or "workbook". It is not "universal", i.e. if you set it while working on one workbook, it does not apply to other workbooks when you open them. In other words, the setting is maintained "dynamically" for each file, not "persistently" for the Calc app.
Also am I setting myself up for some type of problem.
Quite possibly.
The process of rounding introduces a deviation from original number. When working with few valid digits, these deviations add up rapidly, particularly with multiplication/division in multiple steps. In most cases it is better to round explicitly (using some rounding function) when required.
In any case, make sure that the rounded figure is really the one you want to base your calculation on.
TheOldThug
Posts: 16
Joined: Fri Jun 12, 2020 3:03 pm

Re: [Solved] Precision as shown

Post by TheOldThug »

Thank you everyone, I see that it could cause some problems. It seems I need to use Round function in certain places
Open Office 4.1.7 on Windows 10
Post Reply