Is there a formula to compute the natural logarithm of a number in Org-Mode spreadsheet? For example, to compute ln(1), Excel or Calc formula is =ln(1)
, what would it be in Org-Mode?
The result should be 0 as ln(1)=0.
Is there a formula to compute the natural logarithm of a number in Org-Mode spreadsheet? For example, to compute ln(1), Excel or Calc formula is =ln(1)
, what would it be in Org-Mode?
The result should be 0 as ln(1)=0.
You can either use the calc syntax or the elisp syntax.
| x | calc syntax | elisp syntax |
|---+-------------+--------------|
| 1 | 0 | 0.0000 |
| 2 | 0.6931 | 0.6931 |
#+TBLFM: $2=log($1);n4::$3='(log $1);N%.4f
Notice that the output format of the calc syntax depends on the ~/.emacs.d/calc.el parameters.
(plist-put org-calc-default-modes 'calc-language 'latex)
(plist-put org-calc-default-modes 'calc-symbolic-mode t)
| x | calc syntax | elisp syntax | |
|---+-------------+--------------+---|
| 1 | 0 | 0.0000 | |
| 2 | \ln{2} | 0.6931 | |
#+TBLFM: $2=log($1);n4::$3='(log $1);N%.4f
Well, actually =ln(1)
works in org-table
, I just tested it. I didn't know because I didn't find it in the documentation...
C-h i g (calc) Log TAB