[Solved] Advice for Math Proof Language [closed]


I’ve knocked up a quick program to test how long it takes, here I believe I have used a 20 digit long number. I know it’s not exactly the parameters that you have asked for, however it gives a good illustration to what kind of speed you can be expecting.

This was run on a i5-6200U @ 2.30GHz

50 Million Operations

If you are interested on the code that I used here it is. It will not be able to divide 30 digits but a little tweaking will allow it to. This is written in C#.

using System;

namespace _50_Million
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Enter Number ");
            string number = Console.ReadLine();
            Console.Write("What to divide by ");
            string divide = Console.ReadLine();
            Console.Write("How many times ");
            string d = Console.ReadLine();

            decimal previousNumber = Convert.ToDecimal(number);
            decimal times = Convert.ToDecimal(d);
            decimal divideDecimal = Convert.ToDecimal(divide);
            var watch = System.Diagnostics.Stopwatch.StartNew();
            decimal newNumber = 0;

            for (int i = 0; i < times; i++)
            {
                    newNumber = previousNumber / divideDecimal;
                    previousNumber = newNumber;           
            }

            watch.Stop();
            var elapsedMs = watch.ElapsedMilliseconds;

            Console.WriteLine("It has taken " + elapsedMs + " millisecounds to divide " + number + " by " + divide + ", " + d + " times.");
            Console.WriteLine("The Answer is " + newNumber);
            Console.ReadLine();
        }
    }
}

2

solved Advice for Math Proof Language [closed]