💾 Archived View for jacksonchen666.com › posts › 2023-06-18 › 17-38-33 › index.gmi captured on 2023-07-22 at 16:28:32. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-07-10)
-=-=-=-=-=-=-
2023-06-18T15:38:33Z
Qalculate! is a multi-purpose cross-platform desktop calculator.
And if it's multi-purpose, how is it so damn good?
It is simple to use but provides power and versatility normally reserved for complicated math packages, as well as useful tools for everyday needs (such as currency conversion and percent calculation).
Powerful? How powerful?
Today, you're going to find out why I think Qalculate is great.
The program can either be used as a GUI or the CLI.
I am going to focus on the CLI because that's what I've been using instead of the GUI. Because it's not super complicated to use the CLI too.
To start Qalculate, run the `qalc` command.
Now time for some numbers.
1 + 1 = 2
Yep, seems right.
4 × 2 = 8
Still seems fine so far.
What is `x` in `x + x = x`? Since adding 0 to 0 results in 0, so `x` should be 0.
(x + x) = x x = 0
And it just spit out the answer. Great!
Now for some more complicated equations or something
(x^x) = 4 x = 2
No idea if that's right, but it seems like it could be right.
Let's say you're transferring 100 gigabytes (100000000000 bytes) of data at a rate of 20 megabytes (20000000 bytes) per second. How long will that take?
Well, with normal math, you would have to get the numbers down to the same unit, like bytes or megabytes. To keep this a bit easier, I'll do the units in megabytes.
100 gigabytes is 100000 megabytes, 20 megabytes is... 20 megabytes, 100000/20 megabytes is 5000, 5000 seconds is... at least an hour or something, I don't know.
With `qalc`, I just input the following:
100 gigabytes / (20 megabytes per second)
And I just get the following back:
(100 gigabytes) / ((20 megabytes) / second) = 1 h + 23 min + 20 s
No extra work of converting, just... calculated. Right there.
Oh yeah, it can also do converting units. For example:
5000 seconds = 1 h + 23 min + 20 s
That's the same answer, so it should be correct.
Let's say I have 100 US dollars (USD). I'm going to... Hungary or something, and I buy a thing that costs 1000 Hungarian Forints (HUF), and I do that every day. How many days can I buy that thing for?
First of all, you might want to update the exchange rates. Do it with the `exrates` command. Here's the exchange rate in my case:
1 USD ≈ HUF 340.1422579
Now calculation is also easy:
> 100 USD / 1000 HUF) days ((100 USD) / (1000 HUF)) × day ≈ 34.00000000 d + 20.00000000 min + 29.10815247 s
Yep, and that's pretty much it. About 34 days.
I also omitted an opening parenthesis, and it still works. (That parenthesis is required, otherwise you'll end up with like tiny frequencies or something)
I have some cellular data left. My goal is to use only up to 256 MB every month. Given what I do, that is possible, but I also don't want to immediately hit my self-imposed data cap 2 days in the monthly cycle leaving the rest of the 28 or 29 days without cellular data.
So here's the calculation I made:
> 256 MB / 31 days * (31-7) to megabytes ((256 megabytes) / (31 days)) × (31 − 7) ≈ 198.1935484 MB/d
The only variable is 7 AKA how many days left until the "month" ends. In the calculation, that's 7.
Ignore the unit in the result, I have no idea how to get rid of it.
I then set the data cap for today to the resulting amount.
The ultimate math question: What is 0 divided by 0?
If you didn't know, division by zero is complicated. Complicated enough for division by zero to have an entire Wikipedia page.
According to `qalc`, `0/0` is...
> 0/0 0 / 0 = 0/0
It equals to `0/0`...
Don't believe me on how good it is? Yeah I haven't done a good job here at all TBH. There's a post showing how good it is.
https://social.treehouse.systems/@ptrc/110321860953630837
Bonus while I wrote this blog post, I wondered what anything else divided by
0 is.
> 100/0 100 / 0 = 1/0 > 100/0 = 1/0 ((100 / 0) = (1 / 0)) = false
Yeah so it's the answer, but the answer isn't even correct...