コード例 #1
0
    public static void Test()
    {
        long term = -256L;

        term = term << 1;
        long  temp  = -256L;
        ulong uterm = (ulong)(temp);

        uterm = uterm << 1;

        //FixPoint.GenerateSinTable();
        //FixPoint.GenerateAtan2Table();

        FixPointTests tester = new FixPointTests();

        tester.Precision();
        tester.LongToFixPointAndBack();
        tester.DoubleToFixPointAndBack();
        tester.DecimalToFixPointAndBack();
        tester.IntToFixPointAndBack();
        tester.FloatToFixPointAndBack();
        tester.Addition();
        tester.Substraction();
        tester.Multiplication();
        tester.Division();
        tester.Modulus();
        tester.TestSign();
        tester.TestAbs();
        tester.TestSqrt();
        tester.TestSin();
        tester.TestCos();
        tester.TestTan();
        tester.TestAtan2();
    }
コード例 #2
0
ファイル: FixPointTester.cs プロジェクト: suzuke/FixPoint
    public static void Test()
    {
        //FixPoint.GenerateSinTable();
        //FixPoint.GenerateAtan2Table();

        FixPointTests tester = new FixPointTests();

        tester.TestParse();
        tester.Precision();
        tester.LongToFixPointAndBack();
        tester.DoubleToFixPointAndBack();
        tester.DecimalToFixPointAndBack();
        tester.IntToFixPointAndBack();
        tester.FloatToFixPointAndBack();
        tester.Addition();
        tester.Substraction();
        tester.Multiplication();
        tester.Division();
        tester.Modulus();
        tester.TestSign();
        tester.TestAbs();
        tester.TestSqrt();
        tester.TestSin();
        tester.TestCos();
        tester.TestTan();
        tester.TestAtan2();
        //tester.TestMultiplicationSpeed();
        //tester.TestDivisionSpeed();
    }