Exemplo n.º 1
0
        public static void TestDoubleSquareRoot()
        {
            Console.Write("Double Square Root:\t\t");
            double number = 100;

            MathematicalFunctionsTester.DisplayExecutionTime(() =>
            {
                for (int i = 0; i < 100000000; i++)
                {
                    Math.Sqrt(number);
                }
            });
        }
        public static void TestDecimalSinus()
        {
            Console.Write("Decimal Sinus:\t\t\t");
            decimal number = 100m;

            MathematicalFunctionsTester.DisplayExecutionTime(() =>
            {
                for (int i = 0; i < 100000000; i++)
                {
                    Math.Sin((double)number);
                }
            });
        }
        public static void TestDoubleNaturalLogarithm()
        {
            Console.Write("Double Natural Logarithm:\t");
            double number = 100;

            MathematicalFunctionsTester.DisplayExecutionTime(() =>
            {
                for (int i = 0; i < 100000000; i++)
                {
                    Math.Log(number);
                }
            });
        }
        public static void TestFloatSinus()
        {
            Console.Write("Float Sinus:\t\t\t");
            float number = 100.0f;

            MathematicalFunctionsTester.DisplayExecutionTime(() =>
            {
                for (int i = 0; i < 100000000; i++)
                {
                    Math.Sin(number);
                }
            });
        }