emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: James Hawley <yelwah1@comcast.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Rounding in org-mode tables
Date: Sun, 26 Aug 2007 20:25:21 +0200	[thread overview]
Message-ID: <ad094edefba60c2a29ef698c52feb378@science.uva.nl> (raw)
In-Reply-To: <eaa81743b2275ba51296e2eb957f6b3a@comcast.net>


On Aug 26, 2007, at 4:00, James Hawley wrote:

> Hi!
>
> I'm a relatively new emacs and org-mode user so I apologize for the 
> basic nature of this question. Unfortunately, the answer is probably 
> so obvious that no one has had to ask it before, and, as a result, I 
> have not been able to find this subject in the mailing list.  Of 
> course, I may not be doing a good search, so please accept another 
> apology.
>
> Anyway, all I am trying to do is to sum a column of numbers in a table 
> in an org file.  Here's an example:
>
> 935.15
> 6483.80
> 7419.00
> #+TBLFM: @16$4=vsum(@3$4..@4$4);%.2f
>
> The answer is obviously being rounded but I don't want that and I 
> cannot figure out the undoubtedly trivial way to stop it so I get the 
> answer that I want to see - 7418.95.
>
> Thanks for any help anyone offers on this simple (but frustrating for 
> me) question.

Org-mode uses a relatively compact output format for calc in order
to avoid that fields get too wide.  You can fix this by changing
the default format in `org-calc-default-mode' from (float 5) to (float 
8)
or so, but that means each time a number is produced with many digits,
all 8 will be displayed.

The other option is to change the format on the fly, just for a specific
formula, using (again for example) an f8 flag, like

$4 = vsum($1..$3);f8

Hope this helps.

- Carsten

  reply	other threads:[~2007-08-26 18:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-26  2:00 Rounding in org-mode tables James Hawley
2007-08-26 18:25 ` Carsten Dominik [this message]
2007-08-31  1:49   ` James Hawley

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=ad094edefba60c2a29ef698c52feb378@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=yelwah1@comcast.net \
    /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).