From 3.5 billion Reddit comments

15 points

·
30th Apr 2018

Qalculate or only libqalculate with the `qalc`

shell interface:

$ qalc > 1024byte to kilobyte

1024 * byte = 1,024 kilobytes

> 1024byte to kibibyte

1024 * byte = 1 kibibyte

> 54,43gibibyte - 1000mebibyte + 2gigabyte

(54,43 * gibibyte) - (1000 * mebibyte) + (2 * gigabyte) = approx. 59,395191 gigabytes

> 54,43gibibyte - 1000mebibyte + 2gigabyte to megabyte

(54,43 * gibibyte) - (1000 * mebibyte) + (2 * gigabyte) = approx. 59395,191 megabytes

>

(german locale...so "," as decimal separator)

8 points

·
18th Apr 2019

This is pretty cool, but I'd like to point you towards my favorite engineering calculator, Qalculate. It's handles units, and also allows for the solving of equations. Here's the example from your readme:

multisolve([20'a' + −40 'b' +52 'c' = 45.6; 2.2e−6 'a' + 4 'b' + 9 'c' = −4; −1 'a' + 1 'b' + 2.23e3 'c' = 0], ['a', 'b', 'c']) [0.2759332, −1.0012888, 0.00057274531]

5 points

·
5th May 2021

Have you tried 'Qalculate!'? There is a CLI version that you can call from bash. Here are the date/time functions: https://qalculate.github.io/manual/qalculate-definitions-functions.html#qalculate-definitions-functions-1-Date--Time

5 points

·
12th Jun 2020

Do you plan on adding units conversion, like Qalculate has? It's a massively complicated problem, but some of the more simple unit conversions should be easy. That's the main thing that I use `qalc`

for, but its commandline interface isn't that great.

4 points

·
8th Oct 2020

I did until I discovered Qalculate!: https://qalculate.github.io/

Qalculate! includes a command-line interface.

Here's a short review that provides a nice overview:

Qalculate! – The Best Calculator Application in The Entire Universe

https://itsfoss.com/qalculate/

2 points

·
17th Oct 2021

krunner is a frontend to libqalculate...anything you prefix with "=" gets send to libqualculate for evaluation. That means you can use the qalculate currency conversion directly in krunner (and not the standard one krunner does if you just type "4$")...there is just one problem, you can't use the "to" keyword in krunner for some reasons (That is something I miss so much in krunner). But `=10EUR = x USD`

works...it assignes the USD value to "x" and gives it as result. List of currencies here

Edit: Sorry, no clue about qalculate-qt, I never used it...I either user krunner or `qalc`

in the shell.

2 points

·
21st May 2018

You can't. qalculate doesn't support storage units: https://qalculate.github.io/features.html

Try: `qalc "2 MB + 3 KB"`

Trivia: the qalc cmdline utility has its own share of deps (~ 7 MB). bcal is a ~40 KB binary.

2 points

·
6th May 2018

~~Krunner only seems to do basic math(+, -, *, /, %) but cannot do trigonometry or anything else slightly more advance. While it is really convenient for what it does~~

To do more advanced math that four banging, you can start with a `=`

and it will treat the rest as a calculation and will do trigonometry, solve functions, can do calculations with units. Here are some examples and Here's a full list of functions

2 points

·
9th Aug 2017

Sorry, not sure about krunner itself. It uses qalculate for the currency conversation in the background...so in a shell you can do

$qalc -e > 100€ to $

100 * euro = 118,14 $

> 100USD to AUD

100 * dollar = approx. 125,96919 AUD

The `qalc -e`

updates the currency data from the net at start. Sadly the "to" operator doesn't seem to work in krunner (I really, really miss that one...I haven't found a way to convert decimal to binary either in krunner yet). List of currency units here.

Also...putting "100USD", "100 USD" or "100 usd" in krunner works for me too...so the same as using "$".

2 points

·
24th Nov 2016

Try it with `qalc`

in the shell...has the same behavior. As far as I know libqalculate is the backend for krunners calculator...so probably not much that krunner can do about it.

1 point

·
18th Jan 2022

Calculating software with units you say? How about units?

$ units Currency exchange rates from FloatRates (USD base) on 2021-01-17 3677 units, 109 prefixes, 114 nonlinear units

You have: 1 * 3 millilightseconds You want: miles * 558.84719 / 0.0017893979

It's actually a pretty great program but jokes aside: The Ti-Nspire Software is harder to run on Linux than Linux on a Ti-Nspire. And I don't know whether anyone actually managed the former.

What exactly do you want to do? Just a calculator? I use units, bc and Qalculate.

If you also want to connect to a Ti calculator I'd look into TilP.

1 point

·
13th Oct 2021

I got 1.2304717×10^(-6) W

I recommend downloading https://qalculate.github.io, it's what I use for physics calculations and it makes these calculations very easy since it automatically converts units.

I just typed "3.2 MBq × 2.4 MeV to watt" and it did the job.

1 point

·
7th Apr 2021

KAlgebra is good for plotting graphs but for calculating it lacks a lot of graphics components to help user entering complex expressions. What I mean by advanced calculation is having more features like the ability to show the whole operations expressions in text area with full history and ability to do conversion of bases and units. KCalc feels like tool created for elementary school students.

1 point

·
8th Oct 2020

Convert date to timestand:

`timestamp(Y-M-D)=`

"=" is important to tell krunner it's a libqalculate expression to evaluate.

Examples:
`timestamp(2020-12-31)=`

returns 1609369200

`timestamp(now)=`

returns unix timestamp for right now

Convert unix timestamp to date:

`stamptodate(timestamp)=`

Examples:

`stamptodate(1609369200)=`

returns "2020-12-31T00:00:00"

For more functions check the qalculate docs...most of those work, exceptions I have found so far are syntax related like the conversion stuff with `to`

as you can't manage a "=" in there so krunner doesn't recognize it as qalculate expression.
`

1 point

·
2nd Mar 2020

> functionally superior to the one in 7.

The only thing I can find online is that a "currency converter mode" was added. What makes it functionally better than the one in 7, and what makes it functionally better than a freeware or open-source option like Qualculate or Microsoft Mathematics?

1 point

·
4th Jan 2020

I had quickly Googled the range of distances for the habitable zone (to calculate the width of it; Wikipedia says it's between 0.95 AU and 2.4 AU from the sun), and the average distance from Pluto to the Sun (5,906,380,000 km). Then I doubled the latter to get a rough 'diameter' for the solar system, and plugged everything into a calculator that supports units (I used Qalculate).

Basically I put my diameter for the real solar system in km, divided by 1 yard, multiplied by one inch, and had it convert the result to kilometers to get how far one inch of the model represents in real life. Qalculate supports AUs as a unit, so for the width of the habitable zone I just plugged in 2.4AU - 0.95AU and had it convert that to kilometers.

I suck at mental math, so it's easier for me to just give results from a calculator. They're still approximate anyway, since the values I used to begin with are approximate - so I made sure to use words like 'roughly' and 'about'. It's just easier to copy/paste results from an actual calculator for me, than to spend time trying to get my brain to do arithmetic (even rough arithmetic) on its own.

1 point

·
21st Jul 2018

Try `log10(.01)=`

If you use `log(.01)`

in qalculates shell backend `qalc`

you get this:

$ qalc > log(.01)

log(0,01; e) = approx. -4,6051702

It uses "e" as base. Can have a look here. But not everything that works in qalculate also works in krunner, I couldn't get the arbitory base with `log(Value[, Base])`

to work for example. But it's still often a good start for why krunner behaves like it does as well as reference for functions worth trying out in krunner...now if krunner would only allow the `to`

keyboard as in `45 to bin`

...that qalc functionality I really miss dearly in krunner.

Edit: For what works..it seems krunner can't use any function of qalculate that has more than one parameter for me, `circle(4)=`

works, `cone(4, 5)`

doesn't. But could be a language problem and german using "," as floating point separator because I can use `log10(0,01)=`

and get the correct answer. Seems that breaks all functions needing "," to separate parameters..at least I would guess so. I would be interested to hear if this works in an US locale.

1 point

·
21st May 2018

> You can't. qalculate doesn't support storage units: https://qalculate.github.io/features.html

> Try: `qalc "2 MB + 3 KB"`

2 mebibytes + 3 kibibytes to kibibytes

(2 * mebibyte) + (3 * kibibyte) = 2051 kibibytes