Example #1
0
File: MathTest.cs Project: epam/DFP
        public void TestIsCanonical()
        {
            Assert.True(Scalbn(FromInt32(314), -2).IsCanonical());
            Assert.True(Scalbn(FromInt32(-314), -2).IsCanonical());

            Assert.True(Zero.IsCanonical());

            Assert.True(NaN.IsCanonical());
            Assert.True(PositiveInfinity.IsCanonical());
            Assert.True(NegativeInfinity.IsCanonical());
        }
Example #2
0
File: MathTest.cs Project: epam/DFP
        public void TestIsSubnormal()
        {
            Assert.False(Scalbn(FromInt32(314), -2).IsSubnormal());
            Assert.False(Scalbn(FromInt32(-314), -2).IsSubnormal());

            Assert.False(Zero.IsSubnormal());

            Assert.False(NaN.IsSubnormal());
            Assert.False(PositiveInfinity.IsSubnormal());
            Assert.False(NegativeInfinity.IsSubnormal());
        }