Launchpad has imported 3 comments from the remote bug at
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=73410.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2014-01-08T21:02:45+00:00 Bjbraams-2 wrote:

Created attachment 91706
Calc spreadsheet to demonstrate rounding errors for large argument values

This report concerns LibreOffice Calc; functions roundup, rounddown,
trunc, ceiling, floor, int, even and odd.

A minimal set of instructions to reproduce the core of the problem
follows. Open a new blank spreadsheet. In the A1 cell enter
"=power(2,50)+1" (without the quotes) and in the B1 cell enter
"=rounddown(a1,0)-a1" (without the quotes). Expected result: B1=0.
Actual result: B1=5.

More generally, let y=power(2,50)+1. I expect that rounding y to integer
will return y exactly, for any of the functions roundup, rounddown,
trunc, ceiling, floor and int. I also expect that even(y)=y+1 and
odd(y)=y.

Actual results: functions roundup(y,0), rounddown(y,0), trunc(y,0),
ceiling(y,1), floor(y,1) and int(y) all return y+5. Moreover, even(y)=y
and odd(y)=y+6 according to Calc.

(Note that the second argument to roundup, rounddown and trunc indicates
number of places behind the decimal symbol and the second argument to
ceiling and floor indicates the unit.)

There are similar problems with these rounding functions when rounding
to some number (>0) of places behind the decimal symbol.

The attached spreadsheet illustrates the issue. I have highlighted in
yellow the cells where the result is different from what is expected.
Row 5 shows the precise results described here; other rows show similar
calculations for values y=power(2,x)+1 for other values of x.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1261048/comments/7

------------------------------------------------------------------------
On 2014-01-10T11:32:55+00:00 Markus Mohrhard wrote:

Please read about floating point arithmetics.

http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1261048/comments/10

------------------------------------------------------------------------
On 2014-01-10T11:51:26+00:00 Christopher M. Penalver wrote:

Markus Mohrhard, thank you for your comment. While the prior work done
in this area is appreciated, in that it replicates the output of Excel
(yes, I already know LibreOffice isn't Excel), I think closing this as a
Won't Fix is premature, especially predicated on a post from Wikipedia.

Despite this, venerable Gnumeric ( https://projects.gnome.org/gnumeric/ ) does 
in fact provide a more accurate result than LibreOffice or Excel in this 
instance:
lsb_release -rd
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04

apt-cache policy gnumeric
gnumeric:
  Installed: 1.12.9-1
  Candidate: 1.12.9-1
  Version table:
 *** 1.12.9-1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

I think this should be discussed much further technically before making
such a judgement.

Thank you for your understanding.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1261048/comments/11

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libreoffice in Ubuntu.
https://bugs.launchpad.net/bugs/1261048

Title:
  [Upstream] Wrong results from rounding functions for large argument

Status in LibreOffice Productivity Suite:
  Confirmed
Status in “libreoffice” package in Ubuntu:
  Won't Fix

Bug description:
  1) lsb_release -rd
  Description:  Ubuntu Trusty Tahr (development branch)
  Release:      14.04

  2) apt-cache policy libreoffice-calc
  libreoffice-calc:
    Installed: 1:4.1.3-0ubuntu3
    Candidate: 1:4.1.3-0ubuntu3
    Version table:
   *** 1:4.1.3-0ubuntu3 0
          500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
          100 /var/lib/dpkg/status

  I am using Ubuntu 12.04.3 LTS and within that LibreOffice 3.5.7.2,
  Build ID: 350m1(Build:2) but this is also reproducible in LO Trunk
  4.3.0.0.alpha0+ on Windows Vista:

  What is expected to happen at a terminal:
  cd ~/Desktop && wget 
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1261048/+attachment/3942054/+files/LibreOfficeRoundingIssues.ods
 && localc --nologo LibreOfficeRoundingIssues

  Is that for cell D5 is it 0.

  What happens instead is that it is 5. This would be an issue with Calc
  numerical precision, as the actual outcome of 5 is also the same with
  Excel.

  WORKAROUND: Use gnumeric:
  apt-cache policy gnumeric
  gnumeric:
    Installed: 1.12.9-1
    Candidate: 1.12.9-1
    Version table:
   *** 1.12.9-1 0
          500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 
Packages
          100 /var/lib/dpkg/status

  ---
  ApportVersion: 2.0.1-0ubuntu17.6
  Architecture: i386
  DistroRelease: Ubuntu 12.04
  InstallationMedia: Ubuntu 12.04.3 LTS "Precise Pangolin" - Release i386 
(20130820.1)
  MarkForUpload: True
  Package: libreoffice 1:3.5.7-0ubuntu5
  PackageArchitecture: i386
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcVersionSignature: Ubuntu 3.8.0-35.50~precise1-generic 3.8.13.13
  Tags:  precise running-unity
  Uname: Linux 3.8.0-35-generic i686
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

To manage notifications about this bug go to:
https://bugs.launchpad.net/df-libreoffice/+bug/1261048/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to