https://bugs.documentfoundation.org/show_bug.cgi?id=166232
Bug ID: 166232
Summary: Cannot divide two field boxes when one field contains
decimal value between 0 and 1
Product: LibreOffice
Version: 24.8.6.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
Description:
I have a similar issue to bug #166231 when using one of my macros & its
interface.
One of the fields gives a wrong answer when performing the same mathematical
operation: when trying dividing the values of two cells, if one of them has a
decimal value between 0 and 1 (e.g.: 0.05), Calc gives a wrong answer.
In my example : if field A (containing value of 3) divided by field B
containing value of 1.5), Calc returns the value of 1.5 (instead of 2).
I understood the cause of this: Calc (& BASIC) consider "," as a thousand
separator while "." is used for decimal values (which is annoying, you should
just keep one of them for decimal values and that's it).
However, you could argue that I should change the language used & switch to
English-US but there again I get the same issue: calculation does not work even
with "." (and "," won't work/display in English-US settings).
Any ideas?
Steps to Reproduce:
1.Build a simple interface with two field boxes
2.Make them divide one another and make the result be written in a cell using
this line of code for instance: MySheet.getCellByPosition(1, 1).Value =
Clng(FieldA_string) / CLng(FieldB_string)
Note: field information need to be converted in Long variables as they are
initially considered as string values when user inserts information.
3.Check for results
Actual Results:
Wrong mathematical result (or sometimes division by zero error)
Expected Results:
Correct mathematical answer (e.g.: 3/1.5 = 2... Not 1.5).
Reproducible: Always
User Profile Reset: Yes
Additional Info:
Version: 24.8.6.2 (X86_64) / LibreOffice Community
Build ID: 6d98ba145e9a8a39fc57bcc76981d1fb1316c60c
CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render:
Skia/Raster; VCL: win
Locale: en-US (fr_FR); UI: fr-FR
Calc: CL threaded
--
You are receiving this mail because:
You are the assignee for the bug.