Changeset 17583
 Timestamp:
 06/04/20 14:05:19 (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/Interval.cs
r17579 r17583 237 237 238 238 /// <summary> 239 /// Calculates the principal square root of a given interval. Discards the second possible result of root, because240 /// all interpreters just calculate the positive principal root.239 /// The interval contains both possible results of the calculated square root +sqrt(x). That results in a wider 240 /// interval, but it contains all possible solutions. 241 241 /// </summary> 242 242 /// <param name="a">Interval to build square root from.</param> … … 244 244 public static Interval SquareRoot(Interval a) { 245 245 if (a.LowerBound < 0) return new Interval(double.NaN, double.NaN); 246 return new Interval( Math.Sqrt(a.LowerBound), Math.Sqrt(a.UpperBound));246 return new Interval(Math.Sqrt(a.UpperBound), Math.Sqrt(a.UpperBound)); 247 247 } 248 248
Note: See TracChangeset
for help on using the changeset viewer.