From: Thierry Banel <tbanelwebmin@free.fr>
To: emacs-orgmode@gnu.org
Subject: Re: How to combine Lisp style and Calc style Table Formula together?
Date: Mon, 09 Apr 2018 18:46:01 +0200 [thread overview]
Message-ID: <5ACB98C9.4010500@free.fr> (raw)
In-Reply-To: <87k1th3xsu.fsf@gmail.com>
Try this:
$2=$1;%1.1e
Le 09/04/2018 04:42, stardiviner a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> I try to display table columns value like 10000 with format "1.0e+4". So I use function (format "%1.1e" $1).
>
> Here is my org table:
>
> | n | Algorithm A (n) | Algorithm B (4n + 8) | Algorithm C (n^{2}) | Algorithm D (2n^{2}+1) | Algorithm E (2n^{2}+3n+1) | Algorithm F (n^{3}) |
> |------+-----------------+----------------------+------------------+---------------------+------------------------+------------------|
> | 1 | 1.0e+00 | 1.2e+01 | 1 | 3 | 6 | 1 |
> | 2 | 2.0e+00 | 1.6e+01 | 4 | 9 | 15 | 8 |
> | 3 | 3.0e+00 | 2.0e+01 | 9 | 19 | 28 | 27 |
> | 10 | 1.0e+01 | 4.8e+01 | 100 | 201 | 231 | 1000 |
> | 100 | 1.0e+02 | 4.1e+02 | 10000 | 20001 | 20301 | 1000000 |
> | 1000 | 1.0e+03 | 4.0e+03 | 1000000 | 2000001 | 2003001 | 1000000000 |
> #+TBLFM: $2='(format "%1.1e" (string-to-number $1))::$3='(format "%1.1e" (+ (* (string-to-number $1) 4) 8))::$4=$1*$1::$5=2*($1*$1)+1::$6=2*($1*$1)+3*$1+1::$7=$1*$1*$1
>
> I want to apply $2 formula to all of resting columns.
> Org info only has Calc and Lisp style. But don't have how to combine them together.
>
> I don't know what's the (format "%1.1e" ..) function corresponding operator under Calc.
>
> - --
> [ stardiviner ] don't need to convince with trends.
> Blog: https://stardiviner.github.io/
> IRC(freenode): stardiviner
> GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
>
> -----BEGIN PGP SIGNATURE-----
>
> iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrK0yEACgkQG13xyVro
> msOs3Qf9GFFmhQ2N5ZERpGhfqLaqphD62oCz1cjP4MzYQ9GaXyFkPrZkysflU5GL
> iXGNK7fjVJP4mi8yCY4P5IdIcKALaZphiRDoQ1H8ItuLomryc2ZXEIaMs1PV/yri
> 6iriNmgbcNC6CDKGyEo2magg/Ii1jZkS+w+Q2Lh+s0jxBNfW1TnwlZ7VAj6Sn7pg
> fLj9osAJAIOMEZnKsR5ZInxZFHSliYRfeATAC/0m7tE1zAYwwY0OfCRAM31CP5b3
> d5peQysyoUh12sZfavWkc+tDnD9cKj0f7lyGVKz9c2swgm81pVTrDfNQsD0flutE
> j+qRwNwkV5qdgCmWEj/4ocnBPulPGQ==
> =mzOu
> -----END PGP SIGNATURE-----
>
>
next prev parent reply other threads:[~2018-04-09 16:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 2:42 How to combine Lisp style and Calc style Table Formula together? stardiviner
2018-04-09 16:46 ` Thierry Banel [this message]
2018-04-10 0:35 ` [SOLVED] " stardiviner
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=5ACB98C9.4010500@free.fr \
--to=tbanelwebmin@free.fr \
--cc=emacs-orgmode@gnu.org \
/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).