static void Main(string[] args)
        {
            string l = DoubleToBinaryStringFormat.DoubleToIEEE754(-255.255);

            Console.WriteLine(l);
            int gcd = 0;

            gcd = GetGCD.GCDEuklid(14, 21);
            gcd = GetGCD.GCDEuklid(14, 21, 28);  //7
            gcd = GetGCD.GCDEuklid(72, 32, 256);
            gcd = GetGCD.GCDEuklid(72, 32, 256); //8
            long timeWatch;

            gcd = GetGCD.GCDEuklid(out timeWatch, 72, 32, 256, 16, 128);//8

            //gcd = GetGCD.GCDEuklid(72, 32, 256, 12);//4


            Console.WriteLine("{0 } {1 }", gcd, timeWatch);

            gcd = GetGCD.GCDStein(out timeWatch, 72, 32, 256, 16, 128);//8
            Console.WriteLine("{0 } {1 }", gcd, timeWatch);

            //gcd = GetGCD.GCDStein(116150, 232704);
            //Console.WriteLine(gcd);



            Console.ReadLine();
        }
Exemple #2
0
 public void GCDSteinTests_ArrayIsNull_ThrowsArgumentNullException()
 {
     Assert.That(() => GetGCD.GCDStein(null), Throws.ArgumentNullException);
 }
Exemple #3
0
 public void GCDSteinTests_WithLessThanOneArgs_ThrowsArgumentException()
 {
     Assert.That(() => GetGCD.GCDStein(0, 120), Throws.ArgumentException);
 }
Exemple #4
0
 public int GCDdSteinTests_WithFourArguments_ExpectedGDCValue(params int[] d)
 {
     return(GetGCD.GCDStein(d));
 }
Exemple #5
0
 public int GCDdSteinTests_WithThreeArguments_ExpectedGDCValue(int a, int b, int c)
 {
     return(GetGCD.GCDStein(a, b, c));
 }
Exemple #6
0
 public int GCDdSteinTests_WithTwoArguments_ExpectedGDCValue(int a, int b)
 {
     return(GetGCD.GCDStein(a, b));
 }
 public int GCDdSteinTests_WithFourArguments_ExpectedGDCValue(int a, int b, int c, params int[] d)
 {
     return(GetGCD.GCDStein(a, b, c, d));
 }