Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comparison of equalities does not work #177

Open
Deseux opened this issue Jul 4, 2024 · 0 comments
Open

comparison of equalities does not work #177

Deseux opened this issue Jul 4, 2024 · 0 comments

Comments

@Deseux
Copy link

Deseux commented Jul 4, 2024

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'}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant