Bug 136794 - calc: ui: round: calc 'round' is erroneously limited to 20 decimal digits,
Summary: calc: ui: round: calc 'round' is erroneously limited to 20 decimal digits,
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2020-09-16 06:04 UTC by b.
Modified: 2021-08-31 10:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description b. 2020-09-16 06:04:33 UTC
Description:
i wanted to round small numbers, for example 6.23455E-27 which has 32 decimal places to 6.235E-27 which has 30 decimal places, and got error messages, 

according to the discussion in: 
https://ask.libreoffice.org/en/question/266009/issue-with-rounding-small-values-round-to-more-than-20-decimals/ - and @Lupp's answer there - it is a bug,  

'=round(6,22735e-27;30)' results in 'Err:502'
'roundsig' as proposed by @erAck can be of help for my originating problem (as i indeed want to cut off all fp-rounding artefacts, also in the 'pre-decimal-range'), but doesn't help for users who want a value with more than 20 but limited! decimals, 
importance 'normal' as the workaround with a user defined round macro-function isn't 'easy' for most users

Steps to Reproduce:
1. key in '=round(6,22735e-27;30)' into a cell, without the quotes, 
2. press enter, 
3. results in 'Err:502', 

Actual Results:
'Err:502'

Expected Results:
6,227e-27


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 0e8696bc2784364cfbefd7fa55da733e350c56cd
CPU threads: 8; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL
Comment 1 Xisco Faulí 2021-02-15 18:04:43 UTC
@Eike, I thought you might be interested in this issue
Comment 2 Commit Notification 2021-05-23 01:05:29 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/49af7e22e61c2e5d440ad55cd362388983e128ae

Related: tdf#136794 tdf#137063 Unlimit decimals in rtl_math_round()

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2021-05-23 14:25:09 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f613caedb14fb514c9ef26c42830f8a6c12c53ef

Resolves: tdf#136794 Unlimit decimals for ROUND()

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2021-05-24 14:14:51 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4c5bbb25d215b618c38e2fec58d0cc2f16af3f18

tdf#136794: sc_mathematical_functions: Add unittest

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 BogdanB 2021-05-26 05:02:05 UTC
The result is now 6,227e-27.

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: 42d2b2d55a27f11153ea1713737d93540a19211d
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Thanks for fixing.