Free cookie consent management tool by TermsFeed Policy Generator

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

#2985: removed all usages of IsAlmost from TreeSimplifier (+ minor rearrangement of operands in unit test to match the actual output).

File:
1 edited

Legend:

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

    r17796 r17797  
    272272      #region do not drop subtrees with small weights
    273273      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))");
     274      AssertEqualAfterSimplification("(+ (variable 1.0 a) 1e-14)",
     275                                     "(+ (variable 1.0 a) 1e-14)");
    275276      // 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)");
     277      AssertEqualAfterSimplification("(+ (* (pow (variable 1.0 a) 10) 1e-14) 1.0)",
     278                                     "(+ (* (pow (variable 1.0 a) 10) 1e-14) 1.0)");
    278279      // 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))))");
     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)");
    281282      #endregion
    282283    }
Note: See TracChangeset for help on using the changeset viewer.