From: Carsten Dominik <C.Dominik@uva.nl>
To: Peter Jones <mlists@pmade.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Possible Bug in Table Calculations?
Date: Fri, 16 May 2008 09:39:05 +0200 [thread overview]
Message-ID: <2FB83005-88B1-4EC0-B8C8-67ED62FE3EC9@uva.nl> (raw)
In-Reply-To: <86d4nn4cpy.fsf@pmade.com>
Hi Peter,
org tables work with a limited numerical accuracy of results to avoid
fields that result from operations like divisions to get too wide.
Maybe I really should change this and make people specify a format in
the formula if they want it narrower.
Currently, Org uses cals with only 5 significant digits, this is the
cause for this accuracy. You can change this per equation by
including something like "n8" or "f8" into the mode string, like
@5$1=vsum(@2..@-1);n8%.2f
Or you can customize the variable org-calc-default-formats and change
the format there from (float 5) to something like (float 8), which
will solve you problem for good.
Maybe I should actually do this by default. Yes, I wil, do so.
Better questions about too wide fields than inaccurate calculations.
HTH
- Carsten
On May 15, 2008, at 8:57 PM, Peter Jones wrote:
> I'm probably just missing something, but...
>
> Org Table:
> | Values |
> |---------|
> | 568.68 |
> | 599.32 |
> | 140.16 |
> | 1308.20 |
> #+TBLFM: @5$1=vsum(@2..@-1);%.2f
>
> Results from calc:
> 568.68
> 599.32
> + 1168.
> 140.16
> + 1308.16
>
> Is this some sort of rounding error? What am I doing wrong?
>
> --
> Peter Jones, pmade inc.
> http://pmade.com
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2008-05-16 8:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 18:57 Possible Bug in Table Calculations? Peter Jones
2008-05-16 7:39 ` Carsten Dominik [this message]
2008-05-16 14:35 ` Peter Jones
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=2FB83005-88B1-4EC0-B8C8-67ED62FE3EC9@uva.nl \
--to=c.dominik@uva.nl \
--cc=emacs-orgmode@gnu.org \
--cc=mlists@pmade.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).