Bug 93107 - Division badly broken, displays as 1% of value when result is non-integer
Summary: Division badly broken, displays as 1% of value when result is non-integer
Status: RESOLVED DUPLICATE of bug 86024
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.4.3 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-03 20:28 UTC by Kendall Koning
Modified: 2015-08-04 14:07 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of bug in action (108.93 KB, image/png)
2015-08-03 20:28 UTC, Kendall Koning
Details
Larger screenshot of the bug in action. (522.47 KB, image/png)
2015-08-03 20:39 UTC, Kendall Koning
Details
File used to demonstrate display problem. Data appears correct. (7.71 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-08-04 00:23 UTC, Kendall Koning
Details
Screenshot (25.65 KB, image/png)
2015-08-04 08:32 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kendall Koning 2015-08-03 20:28:50 UTC
Created attachment 117631 [details]
Screenshot of bug in action

BuildID: 2c39ebcf046445232b798108aa8a7e7d89552ea8

Steps to reproduce.

1.  Open LibreOffice
2.  Open new blank spreadsheet
3.  Do some math!  (All in cell A1)
4.  Enter '=3000/8'.  Result is 375 (good)
5.  Enter '=3000/10'.  Result is 300 (still good)
6.  Enter '=3000/9'.  Result is 3.333333  (what?!)
7.  Enter '=3000/8.5'  Result is ~2.941 (what?!)
8.  Enter '=3000/5'  Result is 600.  (good)
9.  Enter '=3000/5.5'  Result is 5.454545...  (what?!)
Comment 1 Kendall Koning 2015-08-03 20:38:22 UTC
Note that the bad display values seem to occur when the result is a non-integer.  Also, further calculations using the displayed value (e.g., using item 6, enter '=A1*3' into cell B1, is correct at 1000) are correct.  Also, the value in the cell displays as 3.3333... but the displayed sum on the lower status bar (at the bottom of the window) displays the mathematically correct result, 333.333...

The display format for A1 is still at default settings, general.  A larger screenshot is provided as the second attachment.
Comment 2 Kendall Koning 2015-08-03 20:39:15 UTC
Created attachment 117632 [details]
Larger screenshot of the bug in action.
Comment 3 MM 2015-08-03 21:17:16 UTC
Unconfirmed with v4.4.5.2 under windows 7 x64.
Unconfirmed with v4.4.5.2 under mint 17.2 x64.
Unconfirmed with v5.0.0.5 under mint 17.2 x64.
Comment 4 m_a_riosv 2015-08-03 23:07:44 UTC
Hi @Kendall, please instead a screenshot could you attach a sample file where you have the issue?

Could you also verify if the option:
Menu/Tools/Options/LibreOffice calc/General - Use printer metrics.
is not activated.

To verify if it's a visualization issue, using the result as input for other cell calculation confirms the erroneous values?

While is not reproduced, changed the importance.
Comment 5 Kendall Koning 2015-08-04 00:21:52 UTC
I have saved a file and will attach it in a minute.  I think the critical section you're looking for is probably this:

<table:table-row table:style-name="ro1"><table:table-cell table:formula="of:=3000/9" office:value-type="float" office:value="333.333333333333" calcext:value-type="float"><text:p>333.3333333333</text:p></table:table-cell><table:table-cell table:formula="of:=[.A1]*3" office:value-type="float" office:value="1000" calcext:value-type="float"><text:p>1000</text:p></table:table-cell></table:table-row>

...which suggests that the values in the save files are correct, and that they are just displaying incorrectly.  At least this means errors don't cascade.

As for the preference setting for "Use printer metrics for text formatting", it is NOT checked.

As far as I can tell based on the information from the OSX Activity Monitor, it's not using any libraries outside of the LibreOffice.app bundle.  But just to eliminate this possibility, I tested the same .app bundle on another Mac.  The problem did exist on that mac as well.  So the problem might be limited to that build on that OS, but it seems to be reproducible across machines.

I'll try newer and older builds next.
Comment 6 Kendall Koning 2015-08-04 00:23:08 UTC
Created attachment 117634 [details]
File used to demonstrate display problem.  Data appears correct.
Comment 7 m_a_riosv 2015-08-04 08:32:52 UTC
Created attachment 117638 [details]
Screenshot

i can't reproduce.
Win7x64Ultimate
Version: 4.4.5.2 Build ID: a22f674fd25a3b6f45bdebf25400ed2adff0ff99

Let's see if someone with Mac can reproduce it.
Comment 8 Alex Thurgood 2015-08-04 14:04:04 UTC
This is a DUP
Comment 9 Alex Thurgood 2015-08-04 14:07:40 UTC

*** This bug has been marked as a duplicate of bug 86024 ***