I am testing out Symbolica’s symbolic capabilities with some orthogonal polynomial computations, and I noticed one issue when rendering a Gaussian, namely the code:
#import "@preview/symbolica:0.1.0": *
#set page(
height: auto,
width: auto,
margin: 1mm,
)
#let x = symbol("x")
#let exp = function(
"exp",
)
$
#to-typst(exp(neg(pow(x, 2))))
$
$
#to-typst(simplify(exp(neg(pow(x, 2)))))
$
$
#to-typst(exp(expand(neg(pow(x, 2)))))
$
$
#to-typst(expand(exp(neg(pow(x, 2)))))
$
$
#to-typst(exp(mul(-1, pow(x, 2))))
$
produces the output
I have some additional issues with fractional prefactors for polynomials not properly expanding out (like Hermite polynomials, which should have all integer coefficients, having fractional prefactors that refuse to combine into integers), but for now, this is the more confusing behavior, since it feels like it should be easy to combine the 1 and x² into just x².
Sorry if the manual has an obvious fix I missed.
