Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER for Linux

Reply
 
Thread Tools Display Modes
Old 08-27-2018, 09:53 PM   #1
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,113
Default OT: Any Linux Calculators that don't suck?

Why do all the Linux calculators suck so bad? I've searched high and low for one that can do simple stuff like the stock Windows calculator and have only found either calculators with GIANT interfaces that still do stoopid things, or smaller and more useful sized ones that still act totally stoopid and require tons of extra keystrokes to accomplish basic things.

What I am looking for is a calculator that can deal with a series of entries like,

52.95-44.5675*125 [Enter] (only a SINGLE enter key press)

and come back with 1,047.8125 and not -5517.9875 which is what I get if not pressing [Enter] every step of the way.

Or can deal with me pasting a long series of numbers grabbed from other things I'm working on like.

250+
205+
245+
244+
235+
241+
268+
260

and end up with 1,948 rather than getting a stoopid "nan" on the calculator display. It takes seven presses of the [Enter] key for the above example, and that is a very shortened example of what I frequently need.

I tried to bring the freekin' Windows calculator over to run in Wine, but it is so entangled in the OS I don't know if that's even possible. Issuing "wine calc" in a terminal window results in,

0009:fixme:actctxarse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0)

Anyway, sorry for the off topic, but since there are some savvy Linux users here, I thought I'd ask. Just today I had to boot Windows so I could paste a LONG list of numbers into it's calculator for simple addition purposes, and I'd really like to quit needing Windows completely and just stay booted up in Linux.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-27-2018, 10:14 PM   #2
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,842
Default

It's a good thread (the topic of general applications).

You can do basic calculations on the commandline, and if you aren't too turned off by the commandline, maybe try GNU Octave. In Octave, you would do: (52.95-44.5675)*125
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 08-27-2018, 10:29 PM   #3
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,842
Default

Doing basic calculations in Octave: https://www.youtube.com/watch?v=sHGqwF2s-tM&t=2m2s

You can use Ocatve without the shown gui.

Some basic things that are nice in Octave:

Assign a calculation result to a variable:

a = pi/2

Then you can do:

a * 2

If you want numbers without the e notation:

format long

pi * pi

Trig functions:

sin(90)

Or in degrees instead of radians:

sind(90)

Octave is very powerful, but it also serves as a nice basic calculator that you can grow with later if you want. At a commandline, you should be able to just type something like, octave, to start it. And type, exit, to quit.
__________________
It's time to take a stand against the synthesizer.

Last edited by brainwreck; 08-27-2018 at 10:45 PM.
brainwreck is offline   Reply With Quote
Old 08-27-2018, 10:33 PM   #4
Garrick
Human being with feelings
 
Garrick's Avatar
 
Join Date: Jul 2009
Location: Wellington
Posts: 4,538
Default

Yeah it is a good thread.


On the calculator that comes with standard ubuntu, the first problem of the subtraction before the multiplier I had to press enter twice


but the simple addition of your second problem acted just the way you wanted.


And actually looked clean visually
Garrick is offline   Reply With Quote
Old 08-28-2018, 01:02 AM   #5
Snap
Human being with feelings
 
Snap's Avatar
 
Join Date: Jul 2011
Posts: 850
Default

I have to agree, Calculators use to suck. Octave is good, but it has an awful lot of dependencies for just a calculator, specially if you don't use Qt5 in advance or you don't plan to use its GUI.

Regarding to CLI calculators if that suits you, qalculate is as good as octave CLI can be but having way less dependencies. It gives you a prompt and you quit it the usual way; Ctrl+c (or Ctrl+d). It also has a GTK UI if you want that.

Another neat solution is python itself if you have it on your system. It usually is a default in many distros. You don't need to learn python, just using its powerful calculation capabilities. A quick websearch will give many guides and tutorials.
Snap is offline   Reply With Quote
Old 08-28-2018, 04:40 AM   #6
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,430
Default

Quote:
Originally Posted by Glennbo View Post
What I am looking for is a calculator that can deal with a series of entries like,

52.95-44.5675*125 [Enter] (only a SINGLE enter key press)

and come back with 1,047.8125 and not -5517.9875 which is what I get if not pressing [Enter] every step of the way.
So you want a calculator that gives you the wrong answer? -5517.9875 is correct - multiplication always comes before subtraction.

----

I'm using the one Ubuntu Studio came with, which AFAIK is the default GNOME one - https://launchpad.net/gnome-calculator - and it works just fine for everything you describe. You can change the mode to Advanced or Scientific by clicking at the top.
Lokasenna is offline   Reply With Quote
Old 08-28-2018, 05:14 AM   #7
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 4,830
Default

Here is a cross-platform web calculator (it needs internet connection): https://web2.0calc.com/
It is much better than Windows' one.
__________________
Quote:
Originally Posted by Sexan View Post
Make a thread "F%#! you Reaper! I quit!" to get more views and feedback since these kind of threads get much more traction
SoundCloudFR: True Non-destructive GLUEAll the REAPER names
vitalker is online now   Reply With Quote
Old 08-28-2018, 05:33 AM   #8
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 25,067
Default

Quote:
Originally Posted by Glennbo View Post

52.95-44.5675*125 [Enter] (only a SINGLE enter key press)

and come back with 1,047.8125 and not -5517.9875 which is what I get if not pressing [Enter] every step of the way.
You want to override Operator precedence, use parens to remove any ambiguity.
__________________
Clever is not the same as good, clever is from the head, good is from the heart. -Benmont Tench
karbomusic is offline   Reply With Quote
Old 08-28-2018, 06:44 AM   #9
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,113
Default

Quote:
Originally Posted by brainwreck View Post
It's a good thread (the topic of general applications).

You can do basic calculations on the commandline, and if you aren't too turned off by the commandline, maybe try GNU Octave. In Octave, you would do: (52.95-44.5675)*125
Thanks for the info. That one is interesting, and appears to be quite capable, but I'm really looking for something that is as close to the basic Windows calculator as possible. Small GUI based calc that I can paste long columns of numbers that were copied from other stuff I'm working on is the one that finally made me boot Windows to use it's calculator though.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-28-2018, 06:54 AM   #10
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,113
Default

Quote:
Originally Posted by Garrick View Post
Yeah it is a good thread.


On the calculator that comes with standard ubuntu, the first problem of the subtraction before the multiplier I had to press enter twice


but the simple addition of your second problem acted just the way you wanted.


And actually looked clean visually
Thanks for that one. You're talking "Gnome-Calculator", correct? I had tried that one, but didn't see any way to paste, but I just reinstalled it and it appears that you can, but just have to know that it can and do a ctrl-v, because it has no pull down menu with a cut, copy, paste on it. I'm guessing you can also do a ctrl-c and copy the result?

It's larger than I would like, but I will keep this one installed now since it can do the thing that made me boot Windows. I didn't want to hand enter a list of 50 or so numbers, and have to remember if I hit [Plus] [Value] [Enter] for every one of them, coz that's more than 150 keystrokes for something I am used to pasting and hitting enter once.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-28-2018, 07:13 AM   #11
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,113
Default

Quote:
Originally Posted by Snap View Post
I have to agree, Calculators use to suck. Octave is good, but it has an awful lot of dependencies for just a calculator, specially if you don't use Qt5 in advance or you don't plan to use its GUI.

Regarding to CLI calculators if that suits you, qalculate is as good as octave CLI can be but having way less dependencies. It gives you a prompt and you quit it the usual way; Ctrl+c (or Ctrl+d). It also has a GTK UI if you want that.

Another neat solution is python itself if you have it on your system. It usually is a default in many distros. You don't need to learn python, just using its powerful calculation capabilities. A quick websearch will give many guides and tutorials.
Thanks. I reinstalled Gnome-Calculator this morning, and it has one of the three things I'm looking for.

I could just write my own calculator, using the Windows programming language I'm running in Wine, that wrote my stock ticker with, but I really don't desire spending my time on something like that. Has anybody ever gotten the Windows calculator to run in Wine?
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-28-2018, 07:21 AM   #12
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,113
Default

Quote:
Originally Posted by vitalker View Post
Here is a cross-platform web calculator (it needs internet connection): https://web2.0calc.com/
It is much better than Windows' one.
Thanks, but I'm really looking for a small footprint one that lives on my desktop. Here's an example of what I mean. Right now I'm using "Kcalc" which fits the bill on size, but misses the mark on everything else.

__________________
Glennbo
Hear My Music - Click Me!!!
--

Last edited by Glennbo; 10-22-2018 at 04:14 PM.
Glennbo is offline   Reply With Quote
Old 08-28-2018, 07:23 AM   #13
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,113
Default

Quote:
Originally Posted by karbomusic View Post
You want to override Operator precedence, use parens to remove any ambiguity.
Hehe, actually I just want the Windows Calculator, or identical functionality to it, but a simple task like that appears to be monumental in Linux!
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-28-2018, 07:37 AM   #14
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,430
Default

Quote:
Originally Posted by Glennbo View Post
Hehe, actually I just want the Windows Calculator, or identical functionality to it, but a simple task like that appears to be monumental in Linux!
If Windows is giving you 1047... for the equation up top then that's one more reason not to be using Windows... :P

Do you need visible buttons? If not, Speedcrunch can get really tiny. With keypads enabled, both it and Qalculate are a little smaller than the Gnome calculator.
Lokasenna is offline   Reply With Quote
Old 08-28-2018, 08:34 AM   #15
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,113
Default

Quote:
Originally Posted by Lokasenna View Post
If Windows is giving you 1047... for the equation up top then that's one more reason not to be using Windows... :P
The Windows calculator may work incorrectly from a math formula perspective, but typing in 1+2+3+4/5 [Enter] and getting the result of 2, is what I'm used to, and is quicker with fewer keystrokes.

Quote:
Do you need visible buttons? If not, Speedcrunch can get really tiny. With keypads enabled, both it and Qalculate are a little smaller than the Gnome calculator.
I'd prefer for it to be like the screen capture I posted, where the calculator lives at the bottom left of my screen all day, where I can copy stuff from other applications I have running, and paste it into the calc for number crunching. I'll check out Speedcrunch. I don't mind smaller, but anything larger than the Kcalc I use now, would be less desirable for me.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 08-28-2018, 08:53 AM   #16
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,430
Default

Quote:
Originally Posted by Glennbo View Post
The Windows calculator may work incorrectly from a math formula perspective, but typing in 1+2+3+4/5 [Enter] and getting the result of 2, is what I'm used to, and is quicker with fewer keystrokes.
Looks like the terminology is "immediate execution" here, the same as with a real non-scientific calculator. Not a lot of options out there, but I did find this: https://electronjs.org/apps/vue-calc

Alternatively, you could learn Reverse Polish Notation and have a lot more options.
Lokasenna is offline   Reply With Quote
Old 08-28-2018, 09:07 AM   #17
Glennbo
Human being with feelings
 
Glennbo's Avatar
 
Join Date: Mar 2008
Location: Planet Earth
Posts: 4,113
Default

Quote:
Originally Posted by Lokasenna View Post
Looks like the terminology is "immediate execution" here, the same as with a real non-scientific calculator. Not a lot of options out there, but I did find this: https://electronjs.org/apps/vue-calc

Alternatively, you could learn Reverse Polish Notation and have a lot more options.
Thanks for the link and the education on immediate execution. I downloaded that one and will give it a spin. It looks like it might fit the bill for the majority of the stuff I do.

I frequently will check a current stock price, subtract from it the price I bought some shares at, and then multiply by the number of shares I bought, which is where stuff like 55.25-44.5675*125 comes into play. That's probably the most simplistic kind of use I do, but after 20 or so years of entering it without the extra [Enter] being needed, it is a constant annoyance for me.
__________________
Glennbo
Hear My Music - Click Me!!!
--
Glennbo is offline   Reply With Quote
Old 09-23-2018, 07:54 PM   #18
james0tucson
Human being with feelings
 
Join Date: Nov 2008
Posts: 8
Default

Would love to see the arithmetic that dc can't handle, or bc if you aren't into the whole RPN thing.
james0tucson is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.