Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17796


Ignore:
Timestamp:
12/22/20 08:43:23 (3 years ago)
Author:
gkronber
Message:

#2985 add unit test cases to reproduce the problem

File:
1 edited

Legend:

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

    r17180 r17796  
    269269
    270270      #endregion
     271
     272      #region do not drop subtrees with small weights
     273      AssertEqualAfterSimplification("(* 1e-14 (variable 1.0 a))", "(variable 1e-14 a)");
     274      AssertEqualAfterSimplification("(+ 1e-14 (variable 1.0 a))", "(+ 1e-14 (variable 1.0 a))");
     275      // a scenario where a term with small weight can have large effect
     276      AssertEqualAfterSimplification("(+ (* 1e-14 (pow (variable 1.0 a) 10)) 1.0)",
     277                                     "(+ (* 1e-14 (pow (variable 1.0 a) 10)) 1.0)");
     278      // a test case (from ticket #2985)
     279      AssertEqualAfterSimplification("(+ 5.9323E-002 (* 5.5606E-016 (exp (variable 3.5861E+001 a))))",
     280                                     "(+ 5.9323E-002 (* 5.5606E-016 (exp (variable 3.5861E+001 a))))");
     281      #endregion
    271282    }
    272283
Note: See TracChangeset for help on using the changeset viewer.