AngouriMath
AngouriMath copied to clipboard
Imprecise inequality
Imprecise inequality for comparing expressions
- [x] Approved
- [x] Implemented
Problem
We currently have ==
and !=
and Equals
checking for the exact equality of two expressions, but no way to compare expressions like a + 1.00001
and a + 1
up to an arithmetic error.
API
Two methods:
public bool EqualsImprecisely(Entity other)
public bool EqualsImprecisely(Entity other, Real error)
Examples
return a.EqualsImprecisely(b, 0.1m);
Unresolved
Names of methods