[svlug] How to do fractional exponents or arbitrary roots in the dc calculator?

Ivan Sergio Borgonovo mail at webthatworks.it
Mon May 30 15:43:57 PDT 2016



On 05/30/2016 11:09 PM, Steve Litt wrote:
> Hi all,
>
> This coming Wednesday night, Kevin Korb and I (and perhaps others) are
> presenting on Linux calculators at the GoLUG meeting. My main
> responsibility is the dc Reverse Polish Notation (RPN) command line
> calculator. It's lightweight, loads quickly, is operable either from a
> script or interactively, and has almost everything you'd need.
>
> Except arbitrary roots (3rd root, 5th root, "2 1 12/ ^" ,etc). That
> leaves a great big hole in its capabilities. All the research I've done
> tells me that yes, it lacks this feature.

> Does anyone know a workaround, *within dc*, to do an arbitrary root?

l() and a bit of algebra seems the only way.

> Does anyone know of *any* other Free Software Linux command line RPN
> calculator, capable of being run from a script?

WHY... WHY... WHY... RPN ;)

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it




More information about the svlug mailing list