This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Description
I am having difficulty with consistency is evaluating expressions.
For example:
var input = KAS.parse("(3x+7)/(x+4)").expr;
var output = KAS.parse("(-3x-7)/(-x-4)").expr;
input.compare(output)
Should evaluate to true every time, but it only does so 90% of the time.
The following simulation run in any browser will show the problem:
var countTrue = 0;
var countFalse = 0;
for(var i = 0; i < 1000; i++) {
if(KAS.parse("(3x+7)/(x+4)").expr.compare(KAS.parse("(-3x-7)/(-x-4)").expr))
countTrue++;
else
countFalse++;
}
console.log('Count true: '+countTrue);
console.log('Count false: '+countFalse);
Any help would be greatly appreciated.