Changeset 18174


Ignore:
Timestamp:
01/02/22 21:19:55 (3 weeks ago)
Author:
gkronber
Message:

#3140: fixed a bug in the calculation of derivatives introduced with changes in the NumberSymbols branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/DerivativeCalculator.cs

    r18143 r18174  
    158158          var newExponent = (NumberTreeNode)numberSy.CreateTreeNode();
    159159          newExponent.Value = ((NumberTreeNode)newPower.GetSubtree(1)).Value - 1;
     160          newPower.RemoveSubtree(1);
     161          newPower.AddSubtree(newExponent);
    160162          return Product(Product(CreateNumber(exponent.Value), newPower), Derive(f, variableName));
    161163        } else throw new NotSupportedException("Cannot derive non-integer powers");
Note: See TracChangeset for help on using the changeset viewer.