[Libreoffice-bugs] [Bug 136046] New: Calculated values copied out of calc are wrong sometimes (off by 0, 00000000000001)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Aug 23 14:32:38 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=136046

            Bug ID: 136046
           Summary: Calculated values copied out of calc are wrong
                    sometimes (off by 0,00000000000001)
           Product: LibreOffice
           Version: 6.4.4.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: bugs_documentfoundation_org.5.kuru at xoxy.net

Description:
I have a calc table where collect data about driving my car. The collected data
is collected as follwing:
  km from: The odometer when I leave the start point (accurate to a 10th of a
kilometer)
    km to: The odometer when I arrive the end point (accurate to a 10th of a
kilometer)
time from: The clock when I leave the start point (accurate on the minute -
important for a different bug)
  time to: The clock when I arrive the end point (accurate on the minute -
important for a different bug)

When I auto calc the distance driven (eg. "=B2-A2") and copy it to notepad I
sometimes get results that show up correctly in calc, but are copied wrong into
notepad. The results are sometimes off by plus or minus 0,00000000000001.
Sometimes even more.

Examples:
  km from: 279,7
    km to: 281,4
The distance (281,4 - 279,7) is 1,7 km according to the calculation of calc
(which is correct). When I copy the information into notepad the inserted value
is 1,69999999999999

This also goes into the other direction:
  km from: 315,9
    km to: 318,2
The distance (318,2 - 315,9) is 2,3 km according to the calculation of calc
(which is correct). When I copy the information into notepad the inserted value
is 2,30000000000001

As said, this behaviour only shows up sometimes. Sometimes not in terms of
time, but for chance per result. Given enough entries, the bug will occur. Out
of the provided 81 examples in the *.ods-file this bug occured 35 times. 24
times the value was lowered, 11 times it got higher. 27 times it was changed by
+/- 1; 4 times it was changed by +/- 2; 2 times it was changed by +/- 3 and 2
times it was changed by even more. (The detailed info here is because I'm
curious if the fail happens on copy and if the same values change or if the
same ammount of them change). For this you can compare your copied version of
the list of the attached *.ods file and my copied results in the *.txt file.


Steps to Reproduce:
1. Enter random numbers that should be calculated
2. Let CALC subtract one from the other
3. Copy the values to notepad

Actual Results:
Sometimes the results are off by 0,00000000000001 or a bit more

Expected Results:
The exact same value is copied


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.4.2 (x64)
Build-ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU-Threads: 6; BS: Windows 6.1 Service Pack 1 Build 7601; UI-Render: Standard;
VCL: win; 
Gebietsschema: de-AT (de_AT); UI-Sprache: de-DE
Calc: CL

----

What I did not check:
 - What happens with other calculations (eg. addition)
 - What happens with other numbers (eg. interger only, float with two or more
decimal places)

----

I know I should have updated to the lastest version of LO first before filing
this bug, but time has been short for me lately. I will test this with the
latest version of the 7.x branch as soon as possible, but I expect the results
to be the same.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200823/8cf3ae24/attachment.htm>


More information about the Libreoffice-bugs mailing list