Example #1
0
        public void TestQuire8Sub()
        {
            var qA = Quire8.Create();

            qA -= (1, 1);
            var pA = qA.ToPosit();

            Assert.That(pA, Is.EqualTo(Posit8.MinusOne));
        }
Example #2
0
        public void TestQuire8Add()
        {
            var qA = Quire8.Create();

            qA += (1, 1);
            var pA = qA.ToPosit();

            Assert.That(pA, Is.EqualTo(Posit8.One));
        }
Example #3
0
 public static quire8_t q8_fdp_sub(quire8_t q, in posit8_t a, in posit8_t b)
Example #4
0
 public static bool IsZero(Quire8 a) => a.m_value == 0;
Example #5
0
 public static bool IsZeroOrNaR(Quire8 q)
 {
     return((q.m_value & ((1u << 31) - 1)) == 0);
 }
Example #6
0
 public static bool IsNaR(Quire8 a) => a.m_value == Quire8.NaR.m_value;
Example #7
0
 static bool isQ8Zero(quire8_t q) => q.m_value == 0;
Example #8
0
 static bool isNaRQ8(quire8_t q) => q.m_value == 0x80000000;