Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4238


Ignore:
Timestamp:
08/17/10 08:08:29 (14 years ago)
Author:
gkronber
Message:

Fixed bug in symbolic simplifier (inversion of constants). #1026

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs

    r4226 r4238  
    502502    private SymbolicExpressionTreeNode Invert(SymbolicExpressionTreeNode x) {
    503503      if (IsConstant(x)) {
    504         ((ConstantTreeNode)x).Value = 1.0 / ((ConstantTreeNode)x).Value;
     504        return MakeConstant(1.0 / ((ConstantTreeNode)x).Value);
    505505      } else if (IsDivision(x)) {
    506506        Trace.Assert(x.SubTrees.Count == 2);
     
    510510        return MakeFraction(MakeConstant(1), x);
    511511      }
    512       return x;
    513512    }
    514513
Note: See TracChangeset for help on using the changeset viewer.