AngouriMath icon indicating copy to clipboard operation
AngouriMath copied to clipboard

Imprecise inequality

Open WhiteBlackGoose opened this issue 3 years ago • 0 comments

Imprecise inequality for comparing expressions

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

WhiteBlackGoose avatar Sep 05 '21 14:09 WhiteBlackGoose