jiggzson / nerdamer

a symbolic math expression evaluator for javascript
http://www.nerdamer.com
MIT License
514 stars 82 forks source link

By default Nerdamer prints e^() instead of exp(). It would be nice to allow printing the standard exp(), for example when resulting output will be passed to another library for plotting. #557

Closed MiltonCobo closed 3 years ago

MiltonCobo commented 4 years ago

I am writing a simple program for solving and plotting linear EDOs. The solutions are plotting using FunctionPlot.js, which takes the string form of a function, say "exp(x)", and very nicely plot it using d3. So, after making the calculations in Nerdamer I want to pass the solution, as a string, to FunctionPlot. As the default output of Nedamer is to print "e^(x)" instead of "exp(x)", it is necessary to make string replacements in order to plot with FunctionPlot. It would be nice to have the options of using the standard "exp(x)" in the outputs of Nerdamer.

jiggzson commented 3 years ago

@MiltonCobo, I know it's been a while but it's fixed. After a little thinking about it, the fixed actually turned out to be quite a bit easier than I originally thought.