Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/29/17 18:05:17 (7 years ago)
Author:
pkimmesw
Message:

#2665 Fixed Integer Overflow Exceptions, Adjusted Offspring Selection Experiments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/FeatureTests/Program.cs

    r15334 r15344  
    3131      // object pooling
    3232      //Test1();
    33       Test1_2();
     33      //Test1_2();
    3434      //Test3();
    3535
     
    6464      //TestRandomBiased(0, 4, 3);
    6565      //TestRandomBiased(0, 4, 4);
     66      TestOverflowException();
    6667
    6768
    6869      Console.WriteLine("\nPress any key to continue...");
    6970      Console.ReadKey(false);
     71    }
     72
     73    private static void TestOverflowException() {
     74      // overflow
     75      //var x = long.MinValue / -1;
     76      var y = unchecked(long.MaxValue + long.MaxValue);
     77      var z = unchecked((long)double.MaxValue);
     78      var a = double.MaxValue + (double.MaxValue - 1);
    7079    }
    7180
Note: See TracChangeset for help on using the changeset viewer.