Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

How does solveFor() work? #663

Answered by jiggzson
ChocolateLoverRaj asked this question in Q&A
Discussion options

You must be logged in to vote

I looked at the source code https://github.com/jiggzson/nerdamer/blob/81a7b14c36d98741a8d49ebf73a63adf8bb6f612/Solve.js but the file is super big and I can't understand from looking at the file.

I agree. The library should be refactored, however is quite a time intensive undertaking. There is an PR (#643) where @mugabe has made quite a bit of progress. Unfortunately it's only the core at the moment.

I'm curious to know how nerdamer('some equation or expression').solveFor('some variable') works.

If you mean the flow for solveFor then it's simply an extension of the Expression class here and after doing some factoring, rewriting, etc. it eventually simply applies the quadratic equation h…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ChocolateLoverRaj
Comment options

Answer selected by ChocolateLoverRaj
Comment options

You must be logged in to vote
1 reply
@ChocolateLoverRaj
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants