Changeset 17950
- Timestamp:
- 04/19/21 11:02:22 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs
r17949 r17950 321 321 var v2 = valuesMatrix[n][row]; 322 322 if (double.IsNaN(v1) && double.IsNaN(v2)) continue; 323 if ( Math.Abs(1.0 - v1 / v2) >= delta) {323 if (v1 != v2 && Math.Abs(1.0 - v1 / v2) >= delta) { 324 324 Console.WriteLine(formatter.Format(tree)); 325 325 foreach (var node in tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix().ToList()) { … … 349 349 } 350 350 string errorMessage = string.Format("Interpreters {0} and {1} do not agree on tree {2} and row {3} (seed = {4}).", interpreters[m].Name, interpreters[n].Name, i, row, seed); 351 Assert.IsTrue(double.IsPositiveInfinity(v1) && double.IsPositiveInfinity(v2) || 352 double.IsNaN(v1) && double.IsNaN(v2) || 353 double.IsNegativeInfinity(v1) && double.IsNegativeInfinity(v2) || 351 Assert.IsTrue(double.IsNaN(v1) && double.IsNaN(v2) || 352 v1 == v2 || // in particular 0 = 0 354 353 Math.Abs(1.0 - v1 / v2) < delta, errorMessage); 355 354 }
Note: See TracChangeset
for help on using the changeset viewer.