Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/09/21 08:11:24 (3 years ago)
Author:
gkronber
Message:

#2985: merged r17797,r17796,r17820 from trunk to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Tests

  • stable/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs

    r17181 r17862  
    9999      #region root rules
    100100      // cancellation
    101       AssertEqualAfterSimplification("(root (variable 2.0 a) 0.0)", "1.0");
     101      AssertEqualAfterSimplification("(root (variable 2.0 a) 0.0)", "NaN");
    102102      // fixed point
    103103      AssertEqualAfterSimplification("(root (variable 2.0 a) 1.0)", "(variable 2.0 a)");
     
    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("(+ (variable 1.0 a) 1e-14)",
     275                                     "(+ (variable 1.0 a) 1e-14)");
     276      // a scenario where a term with small weight can have large effect
     277      AssertEqualAfterSimplification("(+ (* (pow (variable 1.0 a) 10) 1e-14) 1.0)",
     278                                     "(+ (* (pow (variable 1.0 a) 10) 1e-14) 1.0)");
     279      // a test case (from ticket #2985)
     280      AssertEqualAfterSimplification("(+ (* (exp (variable 3.5861E+001 a)) 5.5606E-016) 5.9323E-002)",
     281                                     "(+ (* (exp (variable 3.5861E+001 a)) 5.5606E-016) 5.9323E-002)");
     282      #endregion
    271283    }
    272284
Note: See TracChangeset for help on using the changeset viewer.