, all the trig operators,
, etc etc, and those functions are overloaded for (among other types) numbers and symbolic math. Symbolic math operations simply build up a clojure expression tree, like
2. the library also contains a powerful simplifier that can transform tree => simplified tree… 3. There there is a -TeX> function that can turn this expression into a string of TeX. When you use Clerk to show TeX, it uses
(+ (sin x) (expt (cos x) 3))
and then points katex or mathjax at the resulting string. There are some other fun features of
, like, if a symbol is named after a greek letter it gets shown as greek.
, underscores, show up an subscripts, and superscripts work too;
, without any ceremony, would be REALLY valuable beyond physics etc