Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Solve/simplify using scope (a la math.js' eval) #209

@Ephs05msm

Description

@Ephs05msm

Hello,

Thanks so much for your work on this project. Super interesting and the mission is such a worthy one. I found you all via the math.js site -- then read the blog post -- and am curious whether mathsteps can use an array of symbols (e.g., { x: 10, foo: 20, bar: "foo + x", baz: "bar^2" }) passed in as a scope. In math.js this can be done in math.eval(expr, scope). But math.js returns just the solution and not the steps. I imagine this boils down to (at least) a "change type" of substituting symbols for their respective values. Given the potentially recursive nature of traversing the symbols (e.g., baz in the example above), this may not be a simple thing ... but that's also a bit of what mathsteps is doing I believe.

I poked around the codebase and don't see an obvious way to accomplish this so I thought I would ask.

Thanks again,
Matt

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions