From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: How to use Calc constants in an Org table? Date: Thu, 05 Feb 2015 12:20:16 +0100 Message-ID: <8761bgoba1.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJKZU-0002Z4-SP for emacs-orgmode@gnu.org; Thu, 05 Feb 2015 06:26:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJKZT-0000Fo-Sa for emacs-orgmode@gnu.org; Thu, 05 Feb 2015 06:26:08 -0500 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:56094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJKZT-0000Fc-MT for emacs-orgmode@gnu.org; Thu, 05 Feb 2015 06:26:07 -0500 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 64BDD4D702 for ; Thu, 5 Feb 2015 12:26:02 +0100 (CET) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ni6XXk+2xmjW for ; Thu, 5 Feb 2015 12:26:02 +0100 (CET) Received: from localhost (unknown [IPv6:2001:808:114:6:248a:dbf6:116:c405]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 49E234D700 for ; Thu, 5 Feb 2015 12:26:02 +0100 (CET) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-Mode mailing list Hello Orgers, I'd like Org to compute Fibonacci numbers for me (using a simplified Binet formula, i.e., Fib(n)=round(phi^n)/sqrt(5)). Here's my (unsuccessful) attempt: | n | Fib(n) | |---+--------------------------| | 1 | round(phi / 2.2360680) | | 2 | round(phi^2 / 2.2360680) | | 3 | round(phi^3 / 2.2360680) | | 4 | round(phi^4 / 2.2360680) | | 5 | round(phi^5 / 2.2360680) | | 6 | round(phi^6 / 2.2360680) | | 7 | round(phi^7 / 2.2360680) | | 8 | round(phi^8 / 2.2360680) | #+TBLFM: @3$1..@>$1=1+@-1::@2$2..@>$2=round(phi^$1/sqrt(5)) I tried adding the line #+CONSTANTS: phi=1.61803398875 to the file (and C-c C-c'd on it), but to no avail. What am I doing wrong? TIA, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University