Beispiel #1
0
        public void TestMbfDoubleConstants()
        {
            MbfFloatAsserts.AreEqual(MbfDouble.Zero, 9223372036854775808UL, 0, false);
            MbfFloatAsserts.AreEqual(MbfDouble.Half, 9223372036854775808UL, 128, false);
            MbfFloatAsserts.AreEqual(MbfDouble.One, 9223372036854775808UL, 129, false);
            MbfFloatAsserts.AreEqual(MbfDouble.Two, 9223372036854775808UL, 130, false);
            MbfFloatAsserts.AreEqual(MbfDouble.Ten, 11529215046068469760UL, 132, false);
            MbfFloatAsserts.AreEqual(MbfDouble.Max, 18446744073709551360UL, 255, false);
            MbfFloatAsserts.AreEqual(MbfDouble.E, 12535862302449814272UL, 130, false);
            MbfFloatAsserts.AreEqual(MbfDouble.Pi, 14488038916154245632UL, 130, false);
            MbfFloatAsserts.AreEqual(MbfDouble.Log2, 12786308645202655744UL, 128, false);

            // Limits
            MbfFloatAsserts.AreEqual(MbfDouble.MaxValue, 10239999999999999744UL, 182, false);
            MbfFloatAsserts.AreEqual(MbfDouble.MinValue, 16383999999999999744UL, 178, false);
        }
Beispiel #2
0
        public void TestMbfSingleConstants()
        {
            MbfFloatAsserts.AreEqual(MbfSingle.Zero, 2147483648UL, 0, false);
            MbfFloatAsserts.AreEqual(MbfSingle.Half, 2147483648UL, 128, false);
            MbfFloatAsserts.AreEqual(MbfSingle.One, 2147483648UL, 129, false);
            MbfFloatAsserts.AreEqual(MbfSingle.Two, 2147483648UL, 130, false);
            MbfFloatAsserts.AreEqual(MbfSingle.Ten, 2684354560UL, 132, false);
            MbfFloatAsserts.AreEqual(MbfSingle.Max, 4294967040UL, 255, false);
            MbfFloatAsserts.AreEqual(MbfSingle.E, 2918732800UL, 130, false);
            MbfFloatAsserts.AreEqual(MbfSingle.Pi, 3373259520UL, 130, false);
            MbfFloatAsserts.AreEqual(MbfSingle.Log2, 2977043968UL, 128, false);

            // Limits
            MbfFloatAsserts.AreEqual(MbfSingle.MaxValue, 2559999744UL, 152, false);
            MbfFloatAsserts.AreEqual(MbfSingle.MinValue, 4095999744UL, 148, false);
        }