From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Possible Bug in Table Calculations? Date: Fri, 16 May 2008 09:39:05 +0200 Message-ID: <2FB83005-88B1-4EC0-B8C8-67ED62FE3EC9@uva.nl> References: <86d4nn4cpy.fsf@pmade.com> Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JwvB4-00087g-Ci for emacs-orgmode@gnu.org; Fri, 16 May 2008 04:20:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JwvB3-000871-FD for emacs-orgmode@gnu.org; Fri, 16 May 2008 04:20:33 -0400 Received: from [199.232.76.173] (port=57840 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JwvB3-00086s-93 for emacs-orgmode@gnu.org; Fri, 16 May 2008 04:20:33 -0400 Received: from korteweg.uva.nl ([146.50.98.70]:56628) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JwvB2-0001lp-Rz for emacs-orgmode@gnu.org; Fri, 16 May 2008 04:20:33 -0400 In-Reply-To: <86d4nn4cpy.fsf@pmade.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Peter Jones Cc: emacs-orgmode@gnu.org 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