compute-engine icon indicating copy to clipboard operation
compute-engine copied to clipboard

comparison of equalities does not work

Open Deseux opened this issue 1 year ago • 3 comments

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'}`);

Deseux avatar Jul 04 '24 14:07 Deseux

@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.

Deseux avatar Aug 12 '24 21:08 Deseux

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?

arnog avatar Aug 13 '24 14:08 arnog

I can wait, of course...

Deseux avatar Aug 13 '24 18:08 Deseux

Confirmed fixed in 0.26.2

arnog avatar Oct 04 '24 14:10 arnog