From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Banel Subject: Re: How to combine Lisp style and Calc style Table Formula together? Date: Mon, 09 Apr 2018 18:46:01 +0200 Message-ID: <5ACB98C9.4010500@free.fr> References: <87k1th3xsu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f5Zvl-0006bo-EW for emacs-orgmode@gnu.org; Mon, 09 Apr 2018 12:46:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f5Zvg-00037w-FO for emacs-orgmode@gnu.org; Mon, 09 Apr 2018 12:46:09 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:18265) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f5Zvg-00034q-90 for emacs-orgmode@gnu.org; Mon, 09 Apr 2018 12:46:04 -0400 Received: from [IPv6:2a01:e35:2e21:def0:39f8:7d06:ecec:b30a] (unknown [IPv6:2a01:e35:2e21:def0:39f8:7d06:ecec:b30a]) by smtp3-g21.free.fr (Postfix) with ESMTP id 9815713F90B for ; Mon, 9 Apr 2018 18:46:02 +0200 (CEST) In-Reply-To: <87k1th3xsu.fsf@gmail.com> 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: emacs-orgmode@gnu.org Try this: $2=3D$1;%1.1e Le 09/04/2018 04:42, stardiviner a =E9crit : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > I try to display table columns value like 10000 with format "1.0e+4". S= o 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=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 th= em together. > > I don't know what's the (format "%1.1e" ..) function corresponding oper= ator under Calc. > > - --=20 > [ stardiviner ] don't need to convince with trends. > Blog: https://stardiviner.github.io/ > IRC(freenode): stardiviner > GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 > =20 > -----BEGIN PGP SIGNATURE----- > > iQEzBAEBCAAdFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAlrK0yEACgkQG13xyVro > msOs3Qf9GFFmhQ2N5ZERpGhfqLaqphD62oCz1cjP4MzYQ9GaXyFkPrZkysflU5GL > iXGNK7fjVJP4mi8yCY4P5IdIcKALaZphiRDoQ1H8ItuLomryc2ZXEIaMs1PV/yri > 6iriNmgbcNC6CDKGyEo2magg/Ii1jZkS+w+Q2Lh+s0jxBNfW1TnwlZ7VAj6Sn7pg > fLj9osAJAIOMEZnKsR5ZInxZFHSliYRfeATAC/0m7tE1zAYwwY0OfCRAM31CP5b3 > d5peQysyoUh12sZfavWkc+tDnD9cKj0f7lyGVKz9c2swgm81pVTrDfNQsD0flutE > j+qRwNwkV5qdgCmWEj/4ocnBPulPGQ=3D=3D > =3DmzOu > -----END PGP SIGNATURE----- > >