Bug 145332 - Consider updating Calc help for ROUNDDOWN and TRUNC functions
Summary: Consider updating Calc help for ROUNDDOWN and TRUNC functions
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Rafael Lima
URL:
Whiteboard: target:7.4.0 target:7.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-26 20:25 UTC by Steve Fanning
Modified: 2023-03-14 14:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample ODS file (9.68 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-11 18:36 UTC, Rafael Lima
Details
Exported XLSX file (4.87 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2022-01-11 18:37 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Fanning 2021-10-26 20:25:48 UTC
Description:
The ROUNDDOWN and TRUNC functions in Calc perform exactly the same function (implemented by C++ function ScRoundDown()).

However this is not apparent from the help, which provides independent and (perhaps more importantly) different descriptions of the two.

When time allows, suggest reviewing the help information for these two funtions with a view to achieving greater consistency in wording across them.

Steps to Reproduce:
Read help descriptions for ROUNDDOWN and TRUNC functions.

Actual Results:
Different wording for two functions that perform exactly the same function.

Expected Results:
Consistent wording for two functions that perform exactly the same function.


Reproducible: Always


User Profile Reset: No



Additional Info:
Viewed latest 7.3 online help.
Comment 1 Rafael Lima 2021-11-26 20:47:10 UTC
They're both documented in the same help page:

https://helponline.libreoffice.org/7.3/en-US/text/scalc/01/04060106.html?DbPAR=CALC#bm_id3145991

Fun-fact, in MS Excel ROUNDDOWN and TRUNC have one minor difference: in ROUNDDOWN the argument Num_digits is mandatory, whereas in TRUNC it is optional.

See this discussion:
https://www.mrexcel.com/board/threads/trunc-vs-rounddown.1066382/

However, in LO Calc the argument is optional in both functions.
Comment 2 Rafael Lima 2022-01-11 18:36:59 UTC
Created attachment 177464 [details]
Sample ODS file

Another interesting finding. I created an ODS file using both ROUNDDOWN and TRUNC functions (see attached ODS file) without using the Count argument.

When I exported the file as XLSX (from LibreOffice), it automatically added the Count = 0 to ROUNDDOWN to ensure MS compatibility.
Comment 3 Rafael Lima 2022-01-11 18:37:23 UTC
Created attachment 177465 [details]
Exported XLSX file
Comment 4 Rafael Lima 2022-01-11 20:02:00 UTC
Patch available for review at:
https://gerrit.libreoffice.org/c/help/+/128244
Comment 5 Commit Notification 2022-01-18 23:10:44 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/6b1075e1e032be5bb6cba1dbdcc11de2a1824add

tdf#145332 Improve help pages for TRUNC and ROUNDDOWN
Comment 6 Commit Notification 2023-03-14 14:57:16 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/36f71cb8d29fde0c8b42238ba59bc1d73b042cc6

Related tdf#145332 Fix sentence about TRUNC function