How do you calculate?
Shlomi Fish
shlomif at iglu.org.il
Thu May 20 16:07:43 IDT 2010
On Thursday 20 May 2010 14:55:23 Nadav Har'El wrote:
> For years, I've been wondering: How do other Unix or Linux users do simple
> calculations?
>
> Do you take out an actual physical calculator (which is of course
> ridiculous)? Do you use software that looks like a physical calculator
> (xcalc, kcalc, etc.)?
>
> Or do you use bc? Does anyone actually use bc, which returns "0" as a
> result for the calculation "2/3"? :-) Of course, you can use "scale=10"
> (or the -l option to bc) to fix that, but how many first-time users would
> know that? What posessed the person who decided to make scale=0 the
> default? :-)
I'm either primarily using my head for very simple calculations or use perl -e
for the more complex ones. I never bothered to properly learn bc, and,
naturally, the "2/3" has been a huge turn-off. I've been playing a little with
some advanced calculators such as Qalculate (or full-fledged mathematics
software such as the one I started collecting in
http://www.shlomifish.org/open-source/resources/numerical-software/ ) but
normally, they are an overkill for my humble needs.
I'm also aware of several emulators for HP-48 and subsequent calculators
(which use their proprietary ROM) that display them in a graphical window. I
used to use the official HP-49 emulator on Windows a little, but didn't take
the time to fully investigate it.
Someone I know on IRC started working on his own calculation langauge called
Farnsworth - http://simcop2387.info/ , written in Perl. One of its advantages
at the moment is that it is unit-aware (and distinguishes metres from seconds
or kilograms, etc.), and can convert between units and their combinations.
simcop2387 says that given enough time, he would like to add all the
capabilities of something like Mathematica, but naturally, this will take a
lot of time.
>
> What I have been using myself, is my own version of Kernighan & Pike's
> "Hoc" (see http://nadav.harel.org.il/homepage/hoc/). But since this didn't
> catch on, as didn't the original Hoc (which was available in Research Unix
> and Plan 9, but not anywhere else), unfortunately I'm one of the few who
> do. All of the rest are missing on the convenience of Hoc ;-)
I might check it out.
>
> So I was wondering - how come there isn't more pressure on the Linux
> distributions to include a decent and convenient calculator language?
> Or do people consider what is available decent enough already?
>
Well, some people may use perl -e (or the equivalent python or ruby
invocations which also work as read-eval-print-loop (REPL)) or whatever. I
don't consider GNU bc to be adequate, but like I said - I don't miss it a lot.
But OTOH, I have the need for very few calculations on a daily basis.
> Nadav.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Freecell Solver - http://fc-solve.berlios.de/
God considered inflicting XSLT as the tenth plague of Egypt, but then
decided against it because he thought it would be too evil.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
More information about the Linux-il
mailing list