- Timestamp:
- 12/23/20 17:02:12 (3 years ago)
- Location:
- stable
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk merged: 17579-17580,17583-17584,17754
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis/3.4
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/Interval.cs
- Property svn:mergeinfo changed
r17579 r17803 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.