emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rob Duncan <andapony@tabstopclear.org>
To: emacs-orgmode@gnu.org
Subject: Re: Spreadsheet calc complex number display format
Date: Tue, 07 Jul 2020 08:11:54 -0700	[thread overview]
Message-ID: <m28sfv8imd.fsf@tabstopclear.org> (raw)
In-Reply-To: <20200707035721.GJ19456@volibear> (Russell Adams's message of "Tue, 7 Jul 2020 05:57:21 +0200")

Russell Adams <RLAdams@AdamsInfoServ.Com> writes:

> On Mon, Jul 06, 2020 at 05:59:18PM -0700, Rob Duncan wrote:
>> Rob Duncan <andapony@tabstopclear.org> writes:
>>
>> > Is there a way to specify the display format used for complex number
>> > calculations in the table spreadsheet?  In particular I'd like to be
>> > able control whether a value is displayed in rectangular or polar form.
>>
>> I ended up explicitly using the `polar(Z)' and `rect(Z)' functions in
>> the table formulae and I now get the display format I'm looking for.
>
> Rob, can you paste an example for others to reference later?

Yep, here's one:

  | ! | A          | B          | R               | P                |
  |---+------------+------------+-----------------+------------------|
  | # | (1,1)      | (1,1)      | (0, 2)          | (2; 90.)         |
  | # | (1.414;45) | (1.414;45) | (0., 1.999396)  | (1.999396; 90)   |
  | # | (1,1)      | (1.414;45) | (0., 1.9996980) | (1.9996980; 90.) |
  | # | (1.414;45) | (1,1)      | (0., 1.9996980) | (1.9996980; 90.) |
  #+TBLFM: $4=rect($A*$B)::$5=polar($A*$B)

Rob.


      reply	other threads:[~2020-07-07 15:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-05 23:00 Spreadsheet calc complex number display format Rob Duncan
2020-07-06  6:09 ` Russell Adams
2020-07-06 21:25   ` Rob Duncan
2020-07-07  0:59 ` Rob Duncan
2020-07-07  3:57   ` Russell Adams
2020-07-07 15:11     ` Rob Duncan [this message]

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=m28sfv8imd.fsf@tabstopclear.org \
    --to=andapony@tabstopclear.org \
    --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).