jiggzson / nerdamer

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

Trigonometric Functions #600

Closed Ephraim-Bryski closed 3 years ago

Ephraim-Bryski commented 3 years ago

nerdamer('tan(b)=c').solveFor('b').toString() returns "atan(c)"

but

nerdamer('sin(b)/cos(b)=c').solveFor('b').toString() returns ""

Is it generally not recommended to use nerdamer with trig functions? Is there a workaround?

jiggzson commented 3 years ago

@Ephraim-Bryski, I'm unable to verify but does calling simplify on your equation first work?

Ephraim-Bryski commented 3 years ago

Sorry for the late response. Simplify does work if done on the individual expressions. I see you have a commit to extend simplify to "Equation" would allow direct simplification of the equation instead. Thank you!

jiggzson commented 3 years ago

@Ephraim-Bryski, glad to help.