compute-engine
compute-engine copied to clipboard
comparison of equalities does not work
This code to compare equalities does not work. Answer would be true but it's false.
import { ComputeEngine } from '@cortex-js/compute-engine';
// Initialisation du Compute Engine
const computeEngine = new ComputeEngine();
// Deux équations à comparer
const eq1 = '3x + 1 = 0';
const eq2 = '6x + 2 = 0';
// Convertir les équations en MathJSON
const mathJson1 = computeEngine.parse(eq1);
const mathJson2 = computeEngine.parse(eq2);
// Comparer les équations
const areEqual = mathJson1.isEqual(mathJson2);
console.log(`Les équations sont ${areEqual ? 'égales' : 'différentes'}`);
@arnog, is this issue will be resolved or I have to find an other solution ? I don't want to rush you, it's just to know if I'm patient or if I need to find another solution.
I have a fix in the current repo. I am working on other simplification-related improvements. Ca you wait a few days to get those or do you need a npm release right now?
I can wait, of course...
Confirmed fixed in 0.26.2