mathjs icon indicating copy to clipboard operation
mathjs copied to clipboard

WIP: "Actual" symbolic evaluation demo

Open gwhitney opened this issue 2 years ago • 3 comments

This PR is not intended for merging as-is, but serves as an alternate demonstration (vis-a-vis issue https://github.com/josdejong/mathjs/issues/2437) that essentially all the ingredients already exist in mathjs for evaluation in which all undefined variables evaluate to symbols, therefore possibly returning an expression (Node) rather than a concrete value (while still evaluating all the way to concrete values when possible). Moreover, mathematical manipulation of symbolic expressions can be supported without circularity and without modifying numerous source files.

This PR does however depend on a small addition to typed-function.js, see https://github.com/josdejong/typed-function/pull/125.

See (or run) examples/symbolic_evaluation.mjs for further details on this.

(Note this demo depends on the unmerged PR to simplifyCore, so it appears to have several more changes than it truly does.)

gwhitney avatar Mar 10 '22 00:03 gwhitney

With [email protected], all of the ingredients to complete this implementation are in place, and I would be happy to do so, although I would like to complete the Pocomath proof-of-concept first and have a decision reached as to whether mathjs will be transforming in some way along those lines to be able to decide whether it's better to do this before or after such a reorganization.

gwhitney avatar Aug 17 '22 09:08 gwhitney

In any case, this appears to be a preferable route to #2470, which I will close in favor of this.

gwhitney avatar Aug 17 '22 09:08 gwhitney

👍

josdejong avatar Aug 17 '22 13:08 josdejong