Add a 'graphing calculator'-esque formula mode

I call it that because I don’t know what else to call it lol

So, on the typical calculator that you buy for 99c at a dollar store, the ones that are solar powered and whatnot, when you type “99” and then hit the + key, it won’t show the +… then you type another number and the 99 vanishes. You then hit enter, and it sums the two numbers together.

Meanwhile, on a typical graphing calculator, such as a TI-84+, the same keystroke sequence will net something that looks like this:

This has multiple benefits–

-You can easily see if you’ve made a mistake before you hit Enter

-You can easily FIX those mistakes

-You can have the calculator follow PEMDAS, for example, you could throw “2(5-3)+4²/6” at it and it’ll know what to do and solve it easily:

The reason I bring this up:

My phone can do this. While it doesn’t have squares or square roots, it does have the ability to do this:

And meanwhile kcalc is over here like:

Yes, I can see perfectly.

Actually putting in the keystrokes needed FOR ““2(5-3)+4²/6” does actually give you 6.6666repeating… as long as you sneak in a x between 2 and ( because it doesn’t understand that “2(5-3)” means “multiply 2 by the difference between 5 and 3”, and instead you’ll end up typing “25”.

But YOU CAN’T SEE THAT THAT’S WHAT YOU’RE DOING until you hit Enter and see that you do actually get the right result– because the display you get on kcalc is literally just the same single-number can’t-see-the-operators display as that 99c dollar store calculator.

I’m not asking for a full TI-84 emulator. I just wanna see what I’m doing x3

1 Like


Qalculate has the superb feature of translating your bumbling typing (bottom line - white) into what it actually calculates (cyan above) and correctly indicates that the answer is not exact (it’s an approximation) with

Additionally, the FINAL answer after hitting ⏎ Enter includes exact numbers:

This is from the qalculate-qt front end.

Additionally, it gives tips on parsing, because many people still have trouble with this… to adjust to your style, or ‘correct’ style of writing… together with examples of how it can be interpreted and possible results:

For me, if I write ‘1/2x’ I certainly mean 1/(2x) and not (1/2)x - and so ‘implicit’ would be top choice, but Adaptive is really clever - so I use that.

Implicit: works the same way most Maths text books would do it - conventional is similar to how my older calculator worked, so 2/1(2+1) will calculate (2÷2)×(2+1)… which is actually safer for predictible results…

Adaptive: Tries to ‘guess’ based on context, mixing conventional precedence with heuristics.

Example:

  • Expression: 2/1(2+1)
  • Adaptive might interpret it as conventional (6) or implicit-first (2/3) depending on surrounding syntax.

Handwriting this, I would put 1 on the top line, over all of 1(2+1) this works best.

TL;DR

qalculate-qt or just plain qalculate (can install both and see how they feel).

when i type this into kcalc i get this result

is that not what you want?

do you have show history turned on in the settings (ctrl+H)?

Ah, that works.

I couldn’t, however, type in kcalc (usually do that by typing 4^2) - that was annoying, means I’d have to switch mode to get the function I want and then click on that.

I do prefer the exact output of Qalculate though; = 20/3 and = 6⅔ is better than ≈ 6.666.666.667… it’s the next best thing to doing the sum on paper.

Not sure how you typed ‘4²’ - the normal ‘4^2’ worked for me…

Actually, I just tried the alternative (GTK) qalculate, and I liked that layout even better:

i have iso level 3 shift set to give me a ² when i hit 2 which i typed into kcalc directly, but ^2 should work equally well.

1 Like

unlike 2x - after kcalc I got mixed up, should have been or just 2* or even 2·(5-3)+4²/6

I’ve just added the ‘superior’ numbers… didn’t even need to 10¹⁰⁰ it…

1 Like

i have ² and ³ available on my keyboard layout because square ft and cubic in are common measurements, the rest of them i can access with my .XCompose if i need to using the ^ and _ for super script and subscript versions of all my keys.

This is kinda-sorta what I want but it feels extremely clunky to read in that layout?

holy crap qalculate-qt is exactly what I needed thank you so much

1 Like

Ok, but ALSO check out the GTK version - they’re different (deliberately) and I do prefer the way GTK will present fractions.