[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] How to use Calc constants in an Org table?
From: |
Marcin Borkowski |
Subject: |
[O] How to use Calc constants in an Org table? |
Date: |
Thu, 05 Feb 2015 12:20:16 +0100 |
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..@>address@hidden::@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
- [O] How to use Calc constants in an Org table?,
Marcin Borkowski <=