Bug 136046 - Calculated values copied out of calc are wrong sometimes (off by 0,00000000000001)
Summary: Calculated values copied out of calc are wrong sometimes (off by 0,0000000000...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-23 14:32 UTC by BDF
Modified: 2020-08-23 15:02 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
ods file with table of values (23.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-08-23 14:33 UTC, BDF
Details
My copied results of column F (867 bytes, text/plain)
2020-08-23 14:35 UTC, BDF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BDF 2020-08-23 14:32:38 UTC
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.
Comment 1 BDF 2020-08-23 14:33:47 UTC
Created attachment 164601 [details]
ods file with table of values

Column "F" is the one that you is copied to the notepad
Comment 2 BDF 2020-08-23 14:35:15 UTC
Created attachment 164603 [details]
My copied results of column F

With this you can compare the results so that we see if you get the same numbers copied wrong.
Comment 3 Mike Kaganski 2020-08-23 15:02:24 UTC
This is not a bug. Please see this FAQ page: https://wiki.documentfoundation.org/Faq/Calc/Accuracy