コード例 #1
0
        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();
        }
コード例 #2
0
 public void GCDSteinTests_ArrayIsNull_ThrowsArgumentNullException()
 {
     Assert.That(() => GetGCD.GCDStein(null), Throws.ArgumentNullException);
 }
コード例 #3
0
 public void GCDSteinTests_WithLessThanOneArgs_ThrowsArgumentException()
 {
     Assert.That(() => GetGCD.GCDStein(0, 120), Throws.ArgumentException);
 }
コード例 #4
0
 public int GCDdSteinTests_WithFourArguments_ExpectedGDCValue(params int[] d)
 {
     return(GetGCD.GCDStein(d));
 }
コード例 #5
0
 public int GCDEuklidTests_WithFourArguments_ExpectedGDCValue(params int[] d)
 {
     return(GetGCD.GCDEuklid(d));
 }
コード例 #6
0
 public int GCDdSteinTests_WithThreeArguments_ExpectedGDCValue(int a, int b, int c)
 {
     return(GetGCD.GCDStein(a, b, c));
 }
コード例 #7
0
 public int GCDEuklidTests_WithThreeArguments_ExpectedGDCValue(int a, int b, int c)
 {
     return(GetGCD.GCDEuklid(a, b, c));
 }
コード例 #8
0
 public int GCDdSteinTests_WithTwoArguments_ExpectedGDCValue(int a, int b)
 {
     return(GetGCD.GCDStein(a, b));
 }
コード例 #9
0
 public int GCDEuklidTests_WithTwoArguments_ExpectedGDCValue(int a, int b)
 {
     return(GetGCD.GCDEuklid(a, b));
 }
コード例 #10
0
 public void GCDEuklidTests_ArrayIsNull_ThrowsArgumentNullException()
 {
     Assert.That(() => GetGCD.GCDEuklid(14, 120, 8, null), Throws.ArgumentNullException);
 }
コード例 #11
0
 public int GCDdSteinTests_WithFourArguments_ExpectedGDCValue(int a, int b, int c, params int[] d)
 {
     return(GetGCD.GCDStein(a, b, c, d));
 }