Algebrite icon indicating copy to clipboard operation
Algebrite copied to clipboard

assigning values to symbols in "eval" and "run" by passing assignment object

Open davidedc opened this issue 9 years ago • 2 comments

numerically solve expression by assigning values to symbols: we can now pass additional expressions to eval() or run() to do that:

Algebrite.run('x^2+y^2', 'x=2', 'y=3') // => 13

It'll be great if it can be done also like math.js do:

Algebrite.run('x^2+y^2', { x: 2, y: 3 })

davidedc avatar Jan 23 '17 11:01 davidedc

Yes, this is a major obstacle in using Algebrite. Ideally, one needs to be able to compile a function into JS like it is done in math.js.

aperep avatar Oct 08 '17 21:10 aperep

Indeed Algebrite can compile to JS, but it's through a strange method called "findDependencies" or similar, you could look into that perhaps. But we miss the "assignment object" thing.

So, I mean, it's two separate things: JS code generation is there but assignment from object is not.

davidedc avatar Oct 09 '17 17:10 davidedc