- Timestamp:
- 10/17/19 10:01:44 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:mergeinfo changed
/trunk merged: 17242,17255,17267-17268,17272-17274,17276,17278,17301-17302,17305-17306,17316,17329
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis merged: 17301,17305
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis/3.4
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis/3.4 merged: 17301,17305
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval.cs
r17226 r17333 226 226 227 227 public static Interval CubicRoot(Interval a) { 228 if (a.LowerBound < 0) return new Interval(double.NaN, double.NaN); 229 return new Interval(Math.Pow(a.LowerBound, 1.0/3), Math.Pow(a.UpperBound, 1.0/3)); 228 var lower = (a.LowerBound < 0) ? -Math.Pow(-a.LowerBound, 1d / 3d) : Math.Pow(a.LowerBound, 1d / 3d); 229 var upper = (a.UpperBound < 0) ? -Math.Pow(-a.UpperBound, 1d / 3d) : Math.Pow(a.UpperBound, 1d / 3d); 230 231 return new Interval(lower, upper); 232 } 233 234 public static Interval Absolute(Interval a) { 235 var absLower = Math.Abs(a.LowerBound); 236 var absUpper = Math.Abs(a.UpperBound); 237 return new Interval(Math.Min(absLower, absUpper), Math.Max(absLower, absUpper)); 230 238 } 231 239 #endregion
Note: See TracChangeset
for help on using the changeset viewer.