From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: How to combine Lisp style and Calc style Table Formula together? Date: Mon, 09 Apr 2018 10:42:41 +0800 Message-ID: <87k1th3xsu.fsf@gmail.com> Reply-To: numbchild@gmail.com Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5Mll-0006L5-UM for emacs-orgmode@gnu.org; Sun, 08 Apr 2018 22:42:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5Mli-0001SW-Ss for emacs-orgmode@gnu.org; Sun, 08 Apr 2018 22:42:58 -0400 Received: from [183.249.132.203] (port=10794 helo=dark.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5Mli-0001Ka-E8 for emacs-orgmode@gnu.org; Sun, 08 Apr 2018 22:42:54 -0400 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" To: org-mode =2D----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}) | Alg= orithm 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=3D'(format "%1.1e" (string-to-number $1))::$3=3D'(format "%1.1e= " (+ (* (string-to-number $1) 4) 8))::$4=3D$1*$1::$5=3D2*($1*$1)+1::$6=3D2*= ($1*$1)+3*$1+1::$7=3D$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 t= ogether. I don't know what's the (format "%1.1e" ..) function corresponding operator= under Calc. =2D --=20 [ stardiviner ] don't need to convince with trends. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 =20=20=20=20=20=20 =2D----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrK0yEACgkQG13xyVro msOs3Qf9GFFmhQ2N5ZERpGhfqLaqphD62oCz1cjP4MzYQ9GaXyFkPrZkysflU5GL iXGNK7fjVJP4mi8yCY4P5IdIcKALaZphiRDoQ1H8ItuLomryc2ZXEIaMs1PV/yri 6iriNmgbcNC6CDKGyEo2magg/Ii1jZkS+w+Q2Lh+s0jxBNfW1TnwlZ7VAj6Sn7pg fLj9osAJAIOMEZnKsR5ZInxZFHSliYRfeATAC/0m7tE1zAYwwY0OfCRAM31CP5b3 d5peQysyoUh12sZfavWkc+tDnD9cKj0f7lyGVKz9c2swgm81pVTrDfNQsD0flutE j+qRwNwkV5qdgCmWEj/4ocnBPulPGQ=3D=3D =3DmzOu =2D----END PGP SIGNATURE-----