(Replying to PARENT post)
(Replying to PARENT post)
1) It handles 1 000 000 * 3 just fine, but returns 3000000. So it would be nice if it would format output as 3 000 000 as well for readability. At least as an optional setting (even though I have no idea why someone wouldn't want that).
2) Some way of referencing last result. Often you need to perform operations step by step, when, say, estimating something. So either 10 \n + 20 \n * 3 ..., or just referencing last output like some special variable. I though I could do it more verbosely by just x = 10; x = x + 20 ..., but that gives "Variable references itself."
3) Not sure about this one, since this is not something natural at all, and I don't know what to propose to make it natural (at least without proposing map/filter/reduce and some sort of multi-line inputs). Neither is it a real problem, but it's just something I probably use a calculator most often: simply adding up a dozen of numbers, copied from somewhere as a column. So currently I must first open vim, convert it to and expression bc will handle ( 15 + 21 + 32 ...), and then paste in to bc. With kalk it would be similar. Would be great if one could skip that step since this (I assume) would be a common use-case. But, yeah, I don't have an actual suggestion on how to naturally address that.
(Replying to PARENT post)
(The pre-built Linux binary segfaults before it can show the result on my ArchLinux box, but the cargo installed one works like a charm.)
(Replying to PARENT post)
(Replying to PARENT post)
As they say, "the answer will surprise you" :)
(Replying to PARENT post)
>> e^iΟ+1
2.6974097548 + 2.6435590641i
>> e^iΟ
1.6974097548 + 2.6435590641i
In fairness, I still donβt know where βeβ comes from in complex number notation. The transition from cos(angle) + i sin(angle) seems to become βe^i(angle), lolβ and no one explains it further. Before I started doing signal processing, I too would have thought that e^i pi is something like 1.69 + 2.64, so itβs correct, in a certain sense. But perhaps not the common mathematical sense.EDIT: Ah, I see the problem. I suspected that e^iΟ was being turned into Οe^i incorrectly, but when I typed the open parenthesis for e^() and put my cursor inside it, typing "i" resulted in e^i() rather than e^(i). So it was impossible to parenthesize correctly, and I assumed e^iΟ had the usual meaning.
(Replying to PARENT post)
(Replying to PARENT post)
Nice work btw!
(Replying to PARENT post)
When I input 3^4^5, it outputs infinity.
(Replying to PARENT post)
(Replying to PARENT post)
It also has units, many built-in physical constants, currency conversion, matrices and probably tons of other stuff I don't know about.
I don't think it can be easily ran in a browser though.
(Replying to PARENT post)
>> f(x) = x^2
>> f''(4)
0.9995297887
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
(Replying to PARENT post)
Any chance in the future that Kalk will support quaternion numbers[1]?
(Replying to PARENT post)
Superscripts: firstly numerals, like 3Β² = 9, but ideally then letters as well, e.g. 3β± = 3^i. Might be suitable to support superscripts to define nth roots, too, e.g. β΅β. tanΒ―ΒΉ can be a thing too.
Subscripts: same deal; logβ 31 = log(31, 2).
Proper arithmetic operators: times (Γ), minus (β), division (Γ·). Also fraction slash (β), which can be preceded and succeeded either by normal numerals (e.g. 12β34) or by superscripts and subscripts (e.g. β΅βΆβββ). (Full font support for fraction slash is weak, but generally tolerable even if imperfect.) Also the prebaked fractions like Β½ and β .
Also mixed fractions: I reckon 1 2/3 should be parsed as 1+2/3, not 12/3. Them Unicode fractions can join in here too, with 1β (using a prebaked fraction) being 1+2/3, or 1Β²Β³βββ (using superscript, fraction slash, subscript) being 1+23/45.
Cubic and quartic roots: β and β.
At this point itβs worth just looking through the whole Symbol, Math Unicode category and implementing everything applicable. Hmm, set operations, lots of fun symbols there.
Lots of fun spaces too, e.g. where I wrote logβ 31 earlier I wanted to use NARROW NO-BREAK SPACE after the β, but alas, HN normalises it to a plain old space. That space gets used as a number grouping separator especially, avoiding the whole ,/. localisation problem without being too wide.