News for hackers. Stuff that matters.
Re:PCalc for macOS by siraben on Thursday November 19, 2020 @09:38PM (#25156858)
Up to Catalina, macOS used to have the overpowered Emacs calculator[0] preinstalled. Default keybinding to activate it in Emacs is C-x * *. I especially like how it uses RPN but also has an algebraic mode, so one can use whichever is more convenient. There's several other features that I use quite often, such as

- symbolic differentiation/integration

- conversion between units

- solving equations

- working with matrices

- rewrite systems

[0] https://www.gnu.org/software/emacs/manual/html_mono/calc.htm...

Re:PCalc for macOS by LeoPanthera on Thursday November 19, 2020 @09:43PM (#25156879)
Well "bc" is still included with macOS. "bc -l" to start it in a useful mode. It's slightly quirky, but very powerful.

For example, "4*a(1)" to calculate pi.

Re:PCalc for macOS by dan-robertson on Friday November 20, 2020 @04:06AM (#25158670)
I don’t really understand how you could read the parent comment and then suggest bc as a reasonable equivalent. For one thing I find interacting with bc to not be so interactive as gnu calc—you have to type one line at a time and it is hard to see intermediate results or make modifications. For a second thing, I don’t think bc includes:

- differentiation

- symbolic/numeric integration

- equation solving/manipulation

- unit conversion

- graphing

- vectors and matrices

- functional array operations like map/reduce

- statistical operations

- a detailed manual

Personally my main use of bc is:

  ... | paste -s -d+ | bc
Re:PCalc for macOS by nomel on Thursday November 19, 2020 @10:21PM (#25157043)
I often just:

    $ python
    from math import *
When you have a hammer...
Re:PCalc for macOS by mprovost on Friday November 20, 2020 @09:04AM (#25160509)
And dc (the original desk calculator) if you want RPN. I pretty much always have a terminal window with dc running for quick math. It's good for doing base conversions too.
Re:PCalc for macOS by ybbond on Friday November 20, 2020 @01:59AM (#25157937)
how do you use this function? I am aware that Emacs keybinding (C-n, C-p, C-M-f) can be used in macOS' text inputs, but I somehow cannot trigger C-x to work
Re:PCalc for macOS by siraben on Friday November 20, 2020 @02:02AM (#25157950)
This keybinding is meant to be used inside Emacs.
Re:PCalc for macOS by ybbond on Friday November 20, 2020 @05:53AM (#25159229)
I see...

I get your previous comment wrong then