You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can add new functions to the appliedFunctionSymbols argument when creating latexToAst or testToAst, which will parse "\myFunction(x)" (latex) or "myFunction(x)" (text) to the ast ["apply", "myFunction", "x"]. If that function is known to mathjs, then it will call the mathjs function when evaluating it. If producing latex, you also need to add it to allowedLatexSymbols of astToLatex so that the result going back to latex is "\myFunction(x)".
I assume if it isn't a function known to mathjs, then I need to implement it as a custom mathjs function, as detailed here: https://mathjs.org/docs/core/extension.html ? Or is there a better way?
Hi
Just wondered if there was a way to add custom math functions to the parsing and evaluation of expressions?
Thanks.
The text was updated successfully, but these errors were encountered: