- Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Description
.solve() doesn't work sometimes
It seems that .solve() doesn't work for certain variables under certain conditions. I think when another unknown variable comes lexically before, it doesn;t work
Steps to Reproduce
import { ComputeEngine } from "@cortex-js/compute-engine"; const ce = new ComputeEngine() const parsed = ce.parse('b+2a = 3') console.debug(parsed.solve('b')?.map((r) => r.toLatex())) // ^ Logs [] (incorrect, expected `3-2a`) console.debug(parsed.solve('a')?.map((r) => r.toLatex())) // ^ Logs ['\\frac{3}{2}-\\frac{b}{2}'] (correct)Compute Engine version
0.30.2
Metadata
Metadata
Assignees
Labels
No labels