public void FloatFitsInt() { using (var a = new HugeFloat(int.MaxValue)) using (var small = new HugeFloat(0.0001)) { Assert.IsTrue(a.FitsInt()); a.Value = a + 1; Assert.IsFalse(a.FitsInt()); a.Value = a - small; Assert.IsTrue(a.FitsInt()); a.SetTo(int.MinValue); Assert.IsTrue(a.FitsInt()); a.Value = a - 1; Assert.IsFalse(a.FitsInt()); a.Value = a + small; Assert.IsTrue(a.FitsInt()); } }