Changeset 16593


Ignore:
Timestamp:
02/07/19 10:24:33 (2 weeks ago)
Author:
chaider
Message:

#2971 changed cubic and square symbol at interval arithmetic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval.cs

    r16592 r16593  
    234234
    235235    public static Interval Square(Interval a) {
    236       return Power(a, new Interval(2, 2));
     236      var values = new List<double> {Math.Pow(a.LowerBound, 2), Math.Pow(a.UpperBound, 2)};
     237
     238      return new Interval(values.Min(), values.Max());
    237239    }
    238240
    239241    public static Interval Cubic(Interval a) {
    240       return Power(a, new Interval(3, 3));
     242      var values = new List<double> {Math.Pow(a.LowerBound, 3), Math.Pow(a.UpperBound, 3)};
     243
     244      return new Interval(values.Min(), values.Max());
    241245    }
    242246
Note: See TracChangeset for help on using the changeset viewer.