Changeset 16764


Ignore:
Timestamp:
04/04/19 16:47:28 (2 weeks ago)
Author:
gkronber
Message:

#3001: fixed a bug in the Excel formatter for 1/x (division with a single argument)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs

    r16702 r16764  
    120120        stringBuilder.Append(")");
    121121      } else if (symbol is Average) {
    122         stringBuilder.Append("(1/");
     122        stringBuilder.Append("(1/(");
    123123        stringBuilder.Append(node.SubtreeCount);
    124124        stringBuilder.Append(")*(");
     
    139139      } else if (symbol is Division) {
    140140        if (node.SubtreeCount == 1) {
    141           stringBuilder.Append("1/");
    142           stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
     141          stringBuilder.Append("1/(");
     142          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
     143          stringBuilder.Append(")");
    143144        } else {
    144145          stringBuilder.Append(FormatRecursively(node.GetSubtree(0)));
Note: See TracChangeset for help on using the changeset viewer.