Closed aniketkotal closed 1 year ago
@cortex-js/compute-engine: v0.8.0 from npm vue: v3.2.40 Minimal Stackblitz demo: https://stackblitz.com/edit/vue-agjdaa?file=src/App.vue
@cortex-js/compute-engine
v0.8.0
vue
v3.2.40
Substituting any variable with 0 returns an evaluated equation with the variable substituted with 0 untouched.
The variable should be treated as 0 and the equation should evaluate as normal
\pi-a-\mathrm{AD}-F_o
Equation: \pi-a-\mathrm{AD}-F_o Variables: AD: 1, F_o: 2, Pi: 3.14, a: 1 Expected Output: Evaluated output Actual Output: 1.14-\mathrm{F_{o}}
AD: 1, F_o: 2, Pi: 3.14, a: 1
Evaluated output
1.14-\mathrm{F_{o}}
Fixed now.
Note that instead of .map((symbol) => symbol._name) you should use .map((x) => x.symbol). In general, properties prefixed with _ are for internal use only.
.map((symbol) => symbol._name)
.map((x) => x.symbol)
_
What's happening
Substituting any variable with 0 returns an evaluated equation with the variable substituted with 0 untouched.
What should happen
The variable should be treated as 0 and the equation should evaluate as normal
Steps to Reproduce
\pi-a-\mathrm{AD}-F_o
as example)Quick Demonstration
Equation:
\pi-a-\mathrm{AD}-F_o
Variables:AD: 1, F_o: 2, Pi: 3.14, a: 1
Expected Output:Evaluated output
Actual Output:1.14-\mathrm{F_{o}}