<story><title>Show HN: Kalk, A calculator with math syntax, complex numbers</title><url>https://kalk.strct.net</url></story><parent_chain></parent_chain><comment><author>chrismorgan</author><text>I immediately found a few Unicode features I hoped were supported but aren’t.&lt;p&gt;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.&lt;p&gt;Subscripts: same deal; log₂ 31 = log(31, 2).&lt;p&gt;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 ⅜.&lt;p&gt;Also mixed fractions: I reckon 1 2&amp;#x2F;3 should be parsed as 1+2&amp;#x2F;3, not 12&amp;#x2F;3. Them Unicode fractions can join in here too, with 1⅔ (using a prebaked fraction) being 1+2&amp;#x2F;3, or 1²³⁄₄₅ (using superscript, fraction slash, subscript) being 1+23&amp;#x2F;45.&lt;p&gt;Cubic and quartic roots: ∛ and ∜.&lt;p&gt;At this point it’s worth just looking through the whole &lt;i&gt;Symbol, Math&lt;/i&gt; Unicode category and implementing everything applicable. Hmm, set operations, lots of fun symbols there.&lt;p&gt;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 ,&amp;#x2F;. localisation problem without being too wide.</text></comment>
<story><title>Show HN: Kalk, A calculator with math syntax, complex numbers</title><url>https://kalk.strct.net</url></story><parent_chain></parent_chain><comment><author>paddim8</author><text>kalk is a calculator that has syntax highlighting, automatically turns names into symbols (eg. sqrt to √), supports math-like syntax (eg. f(x) = x(2sinx + 3) , estimation of derivatives and integrals, complex numbers, and runs in the browser using WebAssembly.</text></comment>