public void TestEquals() { var value1 = new BigDouble(123, 5); var value2 = new BigDouble(1.23, 7); Assert.IsTrue(value1.Equals(value2)); }
public static void AssertEqual(BigDouble bigDouble, double @double, double precision) { if (IsOutsideDoubleRange(bigDouble)) { Assert.Ignore("Result is not in range of possible Double values"); } if (BigDouble.IsNaN(bigDouble) && double.IsNaN(@double)) { return; } Assert.That(bigDouble.Equals(@double, precision), $"Double implementation: {@double}, BigDouble implementation {bigDouble}"); }