emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mark Janes <markjanes@fastmail.fm>
To: Kein Test <soetwasaberauch@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: org-table-sum
Date: Thu, 24 Sep 2020 13:08:48 -0700	[thread overview]
Message-ID: <87pn6bc4z3.fsf@crane.swizzler.org> (raw)
In-Reply-To: <CAOR_uJr2gmM4kk3248nkKXtgc3s3i=yMmPs0c1mnJbqzDC4+jQ@mail.gmail.com>

I can reproduce this with org 9.3.1.  I imagine the decimal numbers
have precision problems when converted to binary floating point.

A simpler table to reproduce:

|              83.6 |
|                .1 |
|-------------------|
| 83.69999999999999 |


Kein Test <soetwasaberauch@gmail.com> writes:

> Hi,
>
> I found out about org-table-sum yesterday, but I quickly ran into a
> problem, where the result is not right.
>
> For example:
>
> | 171.00 |
> |   4.07 |
> |   4.44 |
> |   2.61 |
> |  12.21 |
> |   6.69 |
> |  19.72 |
> |  23.09 |
> |   6.23 |
> |  15.28 |
> | 250.00 |
> | 250.00 |
> | 250.00 |
> |  78.85 |
> |        |
>
> If point is at the last cell, org-table-sum evaluates to 1094.1899999999998.
>
> I did not find a way to reproduce this with other numbers, but the
> order seems to matter.
>
> Best wishes


  reply	other threads:[~2020-09-24 20:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 19:38 org-table-sum Kein Test
2020-09-24 20:08 ` Mark Janes [this message]
2020-10-22 22:20   ` org-table-sum Jeremie Juste
2020-09-24 20:48 ` org-table-sum Kyle Meyer
2020-09-24 21:07   ` org-table-sum Kyle Meyer
2020-09-25  8:59   ` org-table-sum Robert Pluim
2020-09-26 23:07     ` org-table-sum Jeremie Juste
2020-09-28 12:27       ` org-table-sum Robert Pluim
2020-09-28 12:50         ` org-table-sum Jeremie Juste
2020-09-28 13:54           ` org-table-sum Robert Pluim
2020-10-24 15:15     ` org-table-sum Jeremie Juste
2020-09-25  7:51 ` org-table-sum Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn6bc4z3.fsf@crane.swizzler.org \
    --to=markjanes@fastmail.fm \
    --cc=emacs-orgmode@gnu.org \
    --cc=soetwasaberauch@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).