Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17302


Ignore:
Timestamp:
10/03/19 12:19:48 (5 years ago)
Author:
chaider
Message:

#3032 Added unit tests for cubic root

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis-3.4/IntervalTest.cs

    r16646 r17302  
    159159    public void TestIntervalCbrtOperator() {
    160160      Assert.AreEqual<Interval>(new Interval(1, 2), Interval.CubicRoot(new Interval(1, 8)));
    161       Assert.AreEqual<Interval>(new Interval(double.NaN, double.NaN), Interval.CubicRoot(new Interval(-8, -1)));
     161      Assert.AreEqual<Interval>(new Interval(-2, -2), Interval.CubicRoot(new Interval(-8, -8)));
     162      Assert.AreEqual<Interval>(new Interval(-2, 2), Interval.CubicRoot(new Interval(-8, 8)));
     163      Assert.AreEqual(new Interval(2, 2), Interval.CubicRoot(new Interval(8, 8)));
     164      Assert.AreEqual(new Interval(-Math.Pow(6, 1.0 / 3), 2), Interval.CubicRoot(new Interval(-6, 8)));
     165      Assert.AreEqual(new Interval(2, 2), Interval.CubicRoot(new Interval(8, 8)));
     166      Assert.AreEqual(new Interval(-2, 0), Interval.CubicRoot(new Interval(-8, 0)));
    162167    }
    163168  }
Note: See TracChangeset for help on using the changeset viewer.