Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.cs	(revision 18093)
@@ -120,5 +120,5 @@
 
     private void ChangeVariableValue(string variableName, double value) {
-      foreach (var constNode in variableNodes[variableName].Cast<ConstantTreeNode>())
+      foreach (var constNode in variableNodes[variableName].Cast<NumTreeNode>())
         constNode.Value = value;
 
@@ -223,5 +223,5 @@
     }
 
-    private ISymbolicExpressionTreeNode MakeProduct(ConstantTreeNode c, double weight) {
+    private ISymbolicExpressionTreeNode MakeProduct(NumTreeNode c, double weight) {
       var mul = new Multiplication();
       var prod = mul.CreateTreeNode();
@@ -231,11 +231,11 @@
     }
 
-    private ConstantTreeNode MakeConstantTreeNode(double value) {
-      Constant constant = new Constant();
-      constant.MinValue = value - 1;
-      constant.MaxValue = value + 1;
-      ConstantTreeNode constantTreeNode = (ConstantTreeNode)constant.CreateTreeNode();
-      constantTreeNode.Value = value;
-      return constantTreeNode;
+    private NumTreeNode MakeConstantTreeNode(double value) {
+      Num num = new Num();
+      num.MinValue = value - 1;
+      num.MaxValue = value + 1;
+      NumTreeNode numTreeNode = (NumTreeNode)num.CreateTreeNode();
+      numTreeNode.Value = value;
+      return numTreeNode;
     }
   }
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NMSESingleObjectiveConstraintsEvaluator.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NMSESingleObjectiveConstraintsEvaluator.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/NMSESingleObjectiveConstraintsEvaluator.cs	(revision 18093)
@@ -155,7 +155,7 @@
           if (errorState == OnlineCalculatorError.None) {
             //Set alpha and beta to the scaling nodes from ia grammar
-            var offsetParameter = offset.GetSubtree(1) as ConstantTreeNode;
+            var offsetParameter = offset.GetSubtree(1) as NumTreeNode;
             offsetParameter.Value = alpha;
-            var scalingParameter = scaling.GetSubtree(1) as ConstantTreeNode;
+            var scalingParameter = scaling.GetSubtree(1) as NumTreeNode;
             scalingParameter.Value = beta;
           }
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstantOptimizationEvaluator.cs	(revision 18093)
@@ -32,5 +32,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
-  [Item("Constant Optimization Evaluator", "Calculates Pearson R² of a symbolic regression solution and optimizes the constant used.")]
+  [Item("Num Optimization Evaluator", "Calculates Pearson R² of a symbolic regression solution and optimizes the constant used.")]
   [StorableType("24B68851-036D-4446-BD6F-3823E9028FF4")]
   public class SymbolicRegressionConstantOptimizationEvaluator : SymbolicRegressionSingleObjectiveEvaluator {
@@ -307,11 +307,11 @@
       int i = 0;
       foreach (var node in tree.Root.IterateNodesPrefix().OfType<SymbolicExpressionTreeTerminalNode>()) {
-        ConstantTreeNode constantTreeNode = node as ConstantTreeNode;
+        NumTreeNode numTreeNode = node as NumTreeNode;
         VariableTreeNodeBase variableTreeNodeBase = node as VariableTreeNodeBase;
         FactorVariableTreeNode factorVarTreeNode = node as FactorVariableTreeNode;
-        if (constantTreeNode != null) {
-          if (constantTreeNode.Parent.Symbol is Power 
-              && constantTreeNode.Parent.GetSubtree(1) == constantTreeNode) continue; // exponents in powers are not optimizated (see TreeToAutoDiffTermConverter)
-          constantTreeNode.Value = constants[i++];
+        if (numTreeNode != null) {
+          if (numTreeNode.Parent.Symbol is Power 
+              && numTreeNode.Parent.GetSubtree(1) == numTreeNode) continue; // exponents in powers are not optimizated (see TreeToAutoDiffTermConverter)
+          numTreeNode.Value = constants[i++];
         } else if (updateVariableWeights && variableTreeNodeBase != null)
           variableTreeNodeBase.Weight = constants[i++];
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/LinearModelToTreeConverter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/LinearModelToTreeConverter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/LinearModelToTreeConverter.cs	(revision 18093)
@@ -58,5 +58,5 @@
 
       if (@const!=0.0) {
-        ConstantTreeNode cNode = (ConstantTreeNode)new Constant().CreateTreeNode();
+        NumTreeNode cNode = (NumTreeNode)new Num().CreateTreeNode();
         cNode.Value = @const;
         add.AddSubtree(cNode);
@@ -99,5 +99,5 @@
 
       if (!@const.IsAlmost(0.0)) {
-        ConstantTreeNode cNode = (ConstantTreeNode)new Constant().CreateTreeNode();
+        NumTreeNode cNode = (NumTreeNode)new Num().CreateTreeNode();
         cNode.Value = @const;
         addition.AddSubtree(cNode);
@@ -130,5 +130,5 @@
 
       if (!@const.IsAlmost(0.0)) {
-        ConstantTreeNode cNode = (ConstantTreeNode)new Constant().CreateTreeNode();
+        NumTreeNode cNode = (NumTreeNode)new Num().CreateTreeNode();
         cNode.Value = @const;
         addition.AddSubtree(cNode);
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs	(revision 18093)
@@ -145,6 +145,13 @@
 
     private AutoDiff.Term ConvertToAutoDiff(ISymbolicExpressionTreeNode node) {
-      if (node.Symbol is Constant) {
-        initialConstants.Add(((ConstantTreeNode)node).Value);
+      if (node.Symbol is Num) {
+        initialConstants.Add(((NumTreeNode)node).Value);
+        var var = new AutoDiff.Variable();
+        variables.Add(var);
+        return var;
+      }
+
+      if (node.Symbol is RealConstant) {
+        initialConstants.Add(((RealConstantTreeNode)node).Value);
         var var = new AutoDiff.Variable();
         variables.Add(var);
@@ -260,5 +267,5 @@
       }
       if (node.Symbol is Power) {
-        var powerNode = node.GetSubtree(1) as ConstantTreeNode;
+        var powerNode = node.GetSubtree(1) as NumTreeNode;
         if (powerNode == null)
           throw new NotSupportedException("Only integer powers are allowed in parameter optimization. Try to use exp() and log() instead of the power symbol.");
@@ -330,5 +337,6 @@
           !(n.Symbol is FactorVariable) &&
           !(n.Symbol is LaggedVariable) &&
-          !(n.Symbol is Constant) &&
+          !(n.Symbol is Num) &&
+          !(n.Symbol is RealConstant) &&
           !(n.Symbol is Addition) &&
           !(n.Symbol is Subtraction) &&
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs	(revision 18093)
@@ -49,12 +49,15 @@
       var mul = new Multiplication();
       var div = new Division();
-      var constant = new Constant();
+      var constant = new Num();
       constant.MinValue = -20;
       constant.MaxValue = 20;
+      var number = new RealConstant();
+      number.MinValue = -20;
+      number.MaxValue = 20;
       var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
       var binFactorVariableSymbol = new BinaryFactorVariable();
       var factorVariableSymbol = new FactorVariable();
 
-      var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol, binFactorVariableSymbol, factorVariableSymbol };
+      var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, number, variableSymbol, binFactorVariableSymbol, factorVariableSymbol };
       var functionSymbols = new List<Symbol>() { add, sub, mul, div };
 
@@ -66,4 +69,5 @@
       }
       SetSubtreeCount(constant, 0, 0);
+      SetSubtreeCount(number, 0, 0);
       SetSubtreeCount(variableSymbol, 0, 0);
       SetSubtreeCount(binFactorVariableSymbol, 0, 0);
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs	(revision 18093)
@@ -118,5 +118,5 @@
       variableCondition.InitialFrequency = 0.0;
 
-      var constant = new Constant();
+      var constant = new Num();
       constant.MinValue = -20;
       constant.MaxValue = 20;
@@ -130,7 +130,11 @@
       autoregressiveVariable.Enabled = false;
 
+      var number = new RealConstant();
+      number.MinValue = -20;
+      number.MaxValue = 20;
+
       var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp, tanh,
         airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
-        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
+        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, number, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
       var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, tanh, not, timeLag, integral, derivative,
         airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
@@ -139,5 +143,5 @@
       var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition };
       var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor };
-      var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable };
+      var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, number, laggedVariable, autoregressiveVariable };
 
       foreach (var symb in allSymbols)
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/LinearScalingGrammar.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/LinearScalingGrammar.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/LinearScalingGrammar.cs	(revision 18093)
@@ -66,7 +66,10 @@
       var abs = new Absolute();
       var aq = new AnalyticQuotient();
-      var constant = new Constant();
+      var constant = new Num();
       constant.MinValue = -20;
       constant.MaxValue = 20;
+      var number = new RealConstant();
+      number.MinValue = -20;
+      number.MaxValue = 20;
       var variableSymbol = new Variable();
 
@@ -78,5 +81,5 @@
       //all other symbols
       var allSymbols = new List<Symbol> {
-        add, sub, mul, div, constant, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp,
+        add, sub, mul, div, constant, number, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp,
         tanh, aq, abs
       };
@@ -86,5 +89,5 @@
       var realValueSymbols = new List<Symbol> {
          add, sub, mul, div, sin, cos, tan, tanh, exp, log, aq, abs, square, cube, sqrt, cbrt,
-         variableSymbol, constant,
+         variableSymbol, constant, number
         };
 
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs	(revision 18093)
@@ -105,7 +105,10 @@
       var derivative = new Derivative();
 
-      var constant = new Constant();
+      var constant = new Num();
       constant.MinValue = -20;
       constant.MaxValue = 20;
+      var number = new RealConstant();
+      number.MinValue = -20;
+      number.MaxValue = 20;
       var variableSymbol = new Variable();
       var binFactorVariable = new BinaryFactorVariable();
@@ -121,5 +124,5 @@
       var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
         fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient});
-      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable });
+      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, number, variableSymbol, binFactorVariable, factorVariable });
       var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols });
 
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Hashing/SymbolicExpressionTreeHash.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Hashing/SymbolicExpressionTreeHash.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Hashing/SymbolicExpressionTreeHash.cs	(revision 18093)
@@ -36,5 +36,5 @@
     private static readonly Sine sin = new Sine();
     private static readonly Cosine cos = new Cosine();
-    private static readonly Constant constant = new Constant();
+    private static readonly Num Num = new Num();
 
     private static ISymbolicExpressionTreeNode ActualRoot(this ISymbolicExpressionTree tree) => tree.Root.GetSubtree(0).GetSubtree(0);
@@ -66,5 +66,5 @@
       var symbol = node.Symbol;
       var name = symbol.Name;
-      if (node is ConstantTreeNode constantNode) {
+      if (node is NumTreeNode constantNode) {
         name = strict ? constantNode.Value.ToString() : symbol.Name;
       } else if (node is VariableTreeNode variableNode) {
@@ -222,6 +222,6 @@
             variableTreeNode.VariableName = variable.VariableName;
             variableTreeNode.Weight = variable.Weight;
-          } else if (node.Data is ConstantTreeNode @const) {
-            var constantTreeNode = (ConstantTreeNode)treeNodes[i];
+          } else if (node.Data is NumTreeNode @const) {
+            var constantTreeNode = (NumTreeNode)treeNodes[i];
             constantTreeNode.Value = @const.Value;
           }
@@ -285,9 +285,9 @@
 
         var symbol = child.Data.Symbol;
-        if (child.Data is ConstantTreeNode firstConst) {
+        if (child.Data is NumTreeNode firstConst) {
           // fold sibling constant nodes into the first constant
           for (int k = j + 1; k < children.Length; ++k) {
             var sibling = nodes[children[k]];
-            if (sibling.Data is ConstantTreeNode otherConst) {
+            if (sibling.Data is NumTreeNode otherConst) {
               sibling.Enabled = false;
               node.Arity--;
@@ -301,5 +301,5 @@
           for (int k = j + 1; k < children.Length; ++k) {
             var sibling = nodes[children[k]];
-            if (sibling.Data is ConstantTreeNode constantNode) {
+            if (sibling.Data is NumTreeNode constantNode) {
               sibling.Enabled = false;
               node.Arity--;
@@ -329,5 +329,5 @@
 
         if (node.Arity == 0) { // if everything is simplified this node becomes constant
-          var constantTreeNode = constant.CreateTreeNode<ConstantTreeNode>();
+          var constantTreeNode = Num.CreateTreeNode<NumTreeNode>();
           constantTreeNode.Value = 1;
           nodes[i] = constantTreeNode.ToHashNode();
@@ -344,14 +344,14 @@
       var tmp = nodes;
 
-      if (children.All(x => tmp[x].Data.Symbol is Constant)) {
-        var v = ((ConstantTreeNode)nodes[children.First()].Data).Value;
+      if (children.All(x => tmp[x].Data.Symbol is Num)) {
+        var v = ((NumTreeNode)nodes[children.First()].Data).Value;
         if (node.Arity == 1) {
           v = 1 / v;
         } else if (node.Arity > 1) {
           foreach (var j in children.Skip(1)) {
-            v /= ((ConstantTreeNode)nodes[j].Data).Value;
+            v /= ((NumTreeNode)nodes[j].Data).Value;
           }
         }
-        var constantTreeNode = constant.CreateTreeNode<ConstantTreeNode>();
+        var constantTreeNode = Num.CreateTreeNode<NumTreeNode>();
         constantTreeNode.Value = v;
         nodes[i] = constantTreeNode.ToHashNode();
@@ -368,5 +368,5 @@
         }
         if (node.Arity == 0) {
-          var constantTreeNode = constant.CreateTreeNode<ConstantTreeNode>();
+          var constantTreeNode = Num.CreateTreeNode<NumTreeNode>();
           constantTreeNode.Value = 1; // x / x = 1
           nodes[i] = constantTreeNode.ToHashNode();
@@ -383,5 +383,5 @@
       var childSymbol = child.Data.Symbol;
 
-      if (childSymbol is Constant) {
+      if (childSymbol is Num) {
         nodes[i].Enabled = false;
       } else if ((parentSymbol is Exponential && childSymbol is Logarithm) || (parentSymbol is Logarithm && childSymbol is Exponential)) {
@@ -393,9 +393,9 @@
       var children = nodes.IterateChildren(i);
       var tmp = nodes;
-      if (children.All(x => tmp[x].Data.Symbol is Constant)) {
+      if (children.All(x => tmp[x].Data.Symbol is Num)) {
         foreach (var j in children) {
           nodes[j].Enabled = false;
         }
-        nodes[i] = constant.CreateTreeNode().ToHashNode();
+        nodes[i] = Num.CreateTreeNode().ToHashNode();
       }
     }
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 18093)
@@ -47,4 +47,5 @@
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <Prefer32Bit>false</Prefer32Bit>
+    <LangVersion>default</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -57,4 +58,5 @@
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <Prefer32Bit>false</Prefer32Bit>
+    <LangVersion>default</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
@@ -67,4 +69,5 @@
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <Prefer32Bit>false</Prefer32Bit>
+    <LangVersion>default</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
@@ -77,4 +80,5 @@
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <Prefer32Bit>false</Prefer32Bit>
+    <LangVersion>default</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
@@ -87,4 +91,5 @@
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <Prefer32Bit>false</Prefer32Bit>
+    <LangVersion>default</LangVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
@@ -97,4 +102,5 @@
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     <Prefer32Bit>false</Prefer32Bit>
+    <LangVersion>default</LangVersion>
   </PropertyGroup>
   <ItemGroup>
@@ -232,6 +238,6 @@
     <Compile Include="Symbols\AutoregressiveVariable.cs" />
     <Compile Include="Symbols\Average.cs" />
-    <Compile Include="Symbols\Constant.cs" />
-    <Compile Include="Symbols\ConstantTreeNode.cs" />
+    <Compile Include="Symbols\Num.cs" />
+    <Compile Include="Symbols\NumTreeNode.cs" />
     <Compile Include="Symbols\AiryA.cs" />
     <Compile Include="Symbols\AiryB.cs" />
@@ -245,4 +251,6 @@
     <Compile Include="Symbols\CubeRoot.cs" />
     <Compile Include="Symbols\HyperbolicTangent.cs" />
+    <Compile Include="Symbols\RealConstant.cs" />
+    <Compile Include="Symbols\RealConstantTreeNode.cs" />
     <Compile Include="Symbols\VariableBase.cs" />
     <Compile Include="Symbols\VariableTreeNodeBase.cs" />
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/InfixExpressionParser.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/InfixExpressionParser.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/InfixExpressionParser.cs	(revision 18093)
@@ -57,5 +57,5 @@
   /// </summary>
   public sealed class InfixExpressionParser {
-    private enum TokenType { Operator, Identifier, Number, LeftPar, RightPar, LeftBracket, RightBracket, Comma, Eq, End, NA };
+    private enum TokenType { Operator, Identifier, Number, LeftPar, RightPar, LeftBracket, RightBracket, LeftAngleBracket, RightAngleBracket, Comma, Eq, End, NA };
     private class Token {
       internal double doubleVal;
@@ -82,5 +82,6 @@
       knownSymbols = new BidirectionalLookup<string, ISymbol>(StringComparer.InvariantCulture, new SymbolComparer());
 
-    private Constant constant = new Constant();
+    private Num num = new Num();
+    private RealConstant realConstant = new RealConstant();
     private Variable variable = new Variable();
     private BinaryFactorVariable binaryFactorVar = new BinaryFactorVariable();
@@ -265,4 +266,10 @@
           pos++;
           yield return new Token { TokenType = TokenType.Comma, strVal = "," };
+        } else if (str[pos] == '<') {
+          pos++;
+          yield return new Token {TokenType = TokenType.LeftAngleBracket, strVal = "<"};
+        } else if (str[pos] == '>') {
+          pos++;
+          yield return new Token {TokenType = TokenType.RightAngleBracket, strVal = ">"};
         } else {
           throw new ArgumentException("Invalid character: " + str[pos]);
@@ -326,5 +333,5 @@
           foreach (var negTerm in negTerms) sumNeg.AddSubtree(negTerm);
 
-          var constNode = (ConstantTreeNode)constant.CreateTreeNode();
+          var constNode = (NumTreeNode)num.CreateTreeNode();
           constNode.Value = -1.0;
           var prod = GetSymbol("*").CreateTreeNode();
@@ -524,7 +531,20 @@
           }
         }
+      } else if (next.TokenType == TokenType.LeftAngleBracket) {
+        var leftAngleBracket = tokens.Dequeue();
+        if (leftAngleBracket.TokenType != TokenType.LeftAngleBracket)
+          throw new ArgumentException("opening bracket < expected");
+
+        var idTok = tokens.Dequeue();
+        if (idTok.TokenType != TokenType.Identifier || idTok.strVal.ToLower() != "num")
+          throw new ArgumentException("string 'num' expected");
+        var rightAngleBracket = tokens.Dequeue();
+        if (rightAngleBracket.TokenType != TokenType.RightAngleBracket)
+          throw new ArgumentException("closing bracket > expected");
+        var numNode = (NumTreeNode)num.CreateTreeNode();
+        return numNode;
       } else if (next.TokenType == TokenType.Number) {
         var numTok = tokens.Dequeue();
-        var constNode = (ConstantTreeNode)constant.CreateTreeNode();
+        var constNode = (RealConstantTreeNode)realConstant.CreateTreeNode();
         constNode.Value = numTok.doubleVal;
         return constNode;
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/SymbolicExpressionImporter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/SymbolicExpressionImporter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/SymbolicExpressionImporter.cs	(revision 18093)
@@ -85,5 +85,5 @@
       };
 
-    Constant constant = new Constant();
+    Num num = new Num();
     Variable variable = new Variable();
     LaggedVariable laggedVariable = new LaggedVariable();
@@ -161,5 +161,5 @@
         return tree;
       } else if (tokens.Peek().Symbol == TokenSymbol.NUMBER) {
-        ConstantTreeNode t = (ConstantTreeNode)constant.CreateTreeNode();
+        NumTreeNode t = (NumTreeNode)num.CreateTreeNode();
         t.Value = tokens.Dequeue().DoubleValue;
         return t;
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithBoundsEstimator.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithBoundsEstimator.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithBoundsEstimator.cs	(revision 18093)
@@ -127,5 +127,5 @@
           }
         case OpCodes.Constant: {
-            var constTreeNode = (ConstantTreeNode)currentInstr.dynamicNode;
+            var constTreeNode = (NumTreeNode)currentInstr.dynamicNode;
             result = new Interval(constTreeNode.Value, constTreeNode.Value);
             break;
@@ -324,5 +324,6 @@
         where
           !(n.Symbol is Variable) &&
-          !(n.Symbol is Constant) &&
+          !(n.Symbol is Num) &&
+          !(n.Symbol is RealConstant) &&
           !(n.Symbol is StartSymbol) &&
           !(n.Symbol is Addition) &&
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithCompiledExpressionBoundsEstimator.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithCompiledExpressionBoundsEstimator.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalArithCompiledExpressionBoundsEstimator.cs	(revision 18093)
@@ -116,5 +116,6 @@
         where
           !(n.Symbol is Variable) &&
-          !(n.Symbol is Constant) &&
+          !(n.Symbol is Num) &&
+          !(n.Symbol is RealConstant) &&
           !(n.Symbol is StartSymbol) &&
           !(n.Symbol is Addition) &&
@@ -154,5 +155,5 @@
           }
         case OpCodes.Constant: {
-            var v = (node as ConstantTreeNode).Value;
+            var v = (node as NumTreeNode).Value;
             // we have to make an interval out of the constant because this may be the root of the tree (and we are expected to return an Interval)
             return Expression.Constant(new Interval(v, v), typeof(Interval));
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IntervalInterpreter.cs	(revision 18093)
@@ -186,8 +186,13 @@
             break;
           }
+        case OpCodes.Number: {
+            var constTreeNode = (NumTreeNode)currentInstr.dynamicNode;
+            result = new Interval(constTreeNode.Value, constTreeNode.Value);
+            break;
+          }
         case OpCodes.Constant: {
-            var constTreeNode = (ConstantTreeNode)currentInstr.dynamicNode;
-            result = new Interval(constTreeNode.Value, constTreeNode.Value);
-            break;
+          var constTreeNode = (RealConstantTreeNode)currentInstr.dynamicNode;
+          result = new Interval(constTreeNode.Value, constTreeNode.Value);
+          break;
           }
         case OpCodes.Add: {
@@ -324,5 +329,5 @@
         if (
           !(n.Symbol is Variable) &&
-          !(n.Symbol is Constant) &&
+          !(n.Symbol is Num) &&
           !(n.Symbol is StartSymbol) &&
           !(n.Symbol is Addition) &&
@@ -346,5 +351,5 @@
         else if (n.Symbol is Power) {
           // only integer exponents are supported
-          var exp = n.GetSubtree(1) as ConstantTreeNode;
+          var exp = n.GetSubtree(1) as NumTreeNode;
           if (exp == null || exp.Value != Math.Truncate(exp.Value)) return false;
         }
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs	(revision 18093)
@@ -46,5 +46,5 @@
     Variable = 18,
     LagVariable = 19,
-    Constant = 20,
+    Num = 20,
     Arg = 21,
     Power = 22,
@@ -79,4 +79,5 @@
     CubeRoot = 51,
     Tanh = 52,
+    Constant = 53
   };
   public static class OpCodes {
@@ -101,5 +102,6 @@
     public const byte Variable = (byte)OpCode.Variable;
     public const byte LagVariable = (byte)OpCode.LagVariable;
-    public const byte Constant = (byte)OpCode.Constant;
+    public const byte Number = (byte)OpCode.Num;
+    public const byte Constant = (byte) OpCode.Constant;
     public const byte Arg = (byte)OpCode.Arg;
     public const byte Power = (byte)OpCode.Power;
@@ -159,5 +161,6 @@
       { typeof(LaggedVariable), OpCodes.LagVariable },
       { typeof(AutoregressiveTargetVariable),OpCodes.LagVariable},
-      { typeof(Constant), OpCodes.Constant },
+      { typeof(Num), OpCodes.Number },
+      { typeof(RealConstant), OpCodes.Constant },
       { typeof(Argument), OpCodes.Arg },
       { typeof(Power),OpCodes.Power},
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs	(revision 18093)
@@ -158,5 +158,5 @@
       switch (opcode) {
         case OpCodes.Constant: {
-            var constantTreeNode = (ConstantTreeNode)node;
+            var constantTreeNode = (NumTreeNode)node;
             return Expression.Constant(constantTreeNode.Value);
           }
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeBatchInterpreter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeBatchInterpreter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeBatchInterpreter.cs	(revision 18093)
@@ -279,5 +279,5 @@
             cachedData[variable.VariableName] = code[i].data;
           }
-        } else if (node is ConstantTreeNode constant) {
+        } else if (node is NumTreeNode constant) {
           code[i].value = constant.Value;
           for (int j = 0; j < BATCHSIZE; ++j)
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs	(revision 18093)
@@ -711,9 +711,14 @@
             return;
           }
+        case OpCodes.Number: {
+            NumTreeNode constNode = (NumTreeNode)currentInstr.dynamicNode;
+            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, constNode.Value);
+            return;
+          }
         case OpCodes.Constant: {
-            ConstantTreeNode constNode = (ConstantTreeNode)currentInstr.dynamicNode;
-            il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, constNode.Value);
-            return;
-          }
+          RealConstantTreeNode constNode = (RealConstantTreeNode) currentInstr.dynamicNode;
+          il.Emit(System.Reflection.Emit.OpCodes.Ldc_R8, constNode.Value);
+          return;
+        }
 
         //mkommend: this symbol uses the logistic function f(x) = 1 / (1 + e^(-alpha * x) ) 
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 18093)
@@ -497,7 +497,11 @@
           }
         case OpCodes.Constant: {
-            var constTreeNode = (ConstantTreeNode)currentInstr.dynamicNode;
+            var constTreeNode = (NumTreeNode)currentInstr.dynamicNode;
             return constTreeNode.Value;
           }
+        case OpCodes.Number: {
+          var numberTreeNode = (RealConstantTreeNode) currentInstr.dynamicNode;
+          return numberTreeNode.Value;
+        }
 
         //mkommend: this symbol uses the logistic function f(x) = 1 / (1 + e^(-alpha * x) ) 
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs	(revision 18093)
@@ -416,8 +416,14 @@
         #region opcode switch
         switch (instr.opCode) {
-          case OpCodes.Constant: {
-              var constTreeNode = (ConstantTreeNode)instr.dynamicNode;
+          case OpCodes.Number: {
+              var constTreeNode = (NumTreeNode)instr.dynamicNode;
               instr.value = constTreeNode.Value;
               instr.skip = true; // the value is already set so this instruction should be skipped in the evaluation phase
+            }
+            break;
+          case OpCodes.Constant: {
+            var constTreeNode = (RealConstantTreeNode)instr.dynamicNode;
+            instr.value = constTreeNode.Value;
+            instr.skip = true; // the value is already set so this instruction should be skipped in the evaluation phase
             }
             break;
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeNativeInterpreter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeNativeInterpreter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeNativeInterpreter.cs	(revision 18093)
@@ -82,5 +82,5 @@
           code[i].weight = variable.Weight;
           code[i].data = cachedData[variable.VariableName].AddrOfPinnedObject();
-        } else if (node is ConstantTreeNode constant) {
+        } else if (node is NumTreeNode constant) {
           code[i].value = constant.Value;
         }
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionPruningOperator.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionPruningOperator.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionPruningOperator.cs	(revision 18093)
@@ -172,5 +172,5 @@
       for (int i = 0; i < nodes.Count; ++i) {
         var node = nodes[i];
-        if (node is ConstantTreeNode) continue;
+        if (node is NumTreeNode) continue;
 
         double impactValue, replacementValue;
@@ -181,5 +181,5 @@
         if (!PruneOnlyZeroImpactNodes && impactValue > NodeImpactThreshold) continue;
 
-        var constantNode = (ConstantTreeNode)node.Grammar.GetSymbol("Constant").CreateTreeNode();
+        var constantNode = (NumTreeNode)node.Grammar.GetSymbol("Num").CreateTreeNode();
         constantNode.Value = replacementValue;
 
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs	(revision 18093)
@@ -115,14 +115,14 @@
       if (linearScalingCalculator.ErrorState != OnlineCalculatorError.None) return;
 
-      ConstantTreeNode alphaTreeNode = null;
-      ConstantTreeNode betaTreeNode = null;
+      NumTreeNode alphaTreeNode = null;
+      NumTreeNode betaTreeNode = null;
       // check if model has a structure that can be re-used for scaling
       var startNode = SymbolicExpressionTree.Root.GetSubtree(0);
       var addNode = startNode.GetSubtree(0);
       if (addNode.Symbol is Addition && addNode.SubtreeCount == 2) {
-        alphaTreeNode = (ConstantTreeNode)addNode.Subtrees.LastOrDefault(n => n is ConstantTreeNode);
+        alphaTreeNode = (NumTreeNode)addNode.Subtrees.LastOrDefault(n => n is NumTreeNode);
         var mulNode = addNode.Subtrees.FirstOrDefault(n => n.Symbol is Multiplication);
         if (mulNode != null) {
-          betaTreeNode = (ConstantTreeNode)mulNode.Subtrees.LastOrDefault(n => n is ConstantTreeNode);
+          betaTreeNode = (NumTreeNode)mulNode.Subtrees.LastOrDefault(n => n is NumTreeNode);
         }
       }
@@ -167,5 +167,5 @@
 
     private static ISymbolicExpressionTreeNode MakeConstant(double c) {
-      var node = (ConstantTreeNode)(new Constant()).CreateTreeNode();
+      var node = (NumTreeNode)(new Num()).CreateTreeNode();
       node.Value = c;
       return node;
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModelComplexityCalculator.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModelComplexityCalculator.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModelComplexityCalculator.cs	(revision 18093)
@@ -80,5 +80,5 @@
         case OpCodes.Root: {
             double complexity = CalculateComplexity(node.GetSubtree(0));
-            var exponent = node.GetSubtree(1) as ConstantTreeNode;
+            var exponent = node.GetSubtree(1) as NumTreeNode;
             if (exponent != null) {
               double expVal = exponent.Value;
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisSolutionImpactValuesCalculator.cs	(revision 18093)
@@ -59,5 +59,5 @@
         tempModelParentNode.RemoveSubtree(i);
 
-        var constantNode = new ConstantTreeNode(new Constant()) { Value = repValue };
+        var constantNode = new NumTreeNode(new Num()) { Value = repValue };
         tempModelParentNode.InsertSubtree(i, constantNode);
 
@@ -80,9 +80,9 @@
       IDataset dataset, IEnumerable<int> rows) {
       //optimization: constant nodes return always the same value
-      ConstantTreeNode constantNode = node as ConstantTreeNode;
+      NumTreeNode numNode = node as NumTreeNode;
       BinaryFactorVariableTreeNode binaryFactorNode = node as BinaryFactorVariableTreeNode;
       FactorVariableTreeNode factorNode = node as FactorVariableTreeNode;
-      if (constantNode != null) {
-        yield return constantNode.Value;
+      if (numNode != null) {
+        yield return numNode.Value;
       } else if (binaryFactorNode != null) {
         // valid replacements are either all off or all on
Index: anches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Constant.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Constant.cs	(revision 18092)
+++ 	(revision )
@@ -1,128 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HEAL.Attic;
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [StorableType("5CD355EA-36E4-4E43-B8C4-9E9CF4CBC860")]
-  [Item("Constant", "Represents a constant value.")]
-  public sealed class Constant : Symbol {
-    #region Properties
-    [Storable]
-    private double minValue;
-    public double MinValue {
-      get { return minValue; }
-      set {
-        if (value != minValue) {
-          minValue = value;
-          OnChanged(EventArgs.Empty);
-        }
-      }
-    }
-    [Storable]
-    private double maxValue;
-    public double MaxValue {
-      get { return maxValue; }
-      set {
-        if (value != maxValue) {
-          maxValue = value;
-          OnChanged(EventArgs.Empty);
-        }
-      }
-    }
-    [Storable]
-    private double manipulatorMu;
-    public double ManipulatorMu {
-      get { return manipulatorMu; }
-      set {
-        if (value != manipulatorMu) {
-          manipulatorMu = value;
-          OnChanged(EventArgs.Empty);
-        }
-      }
-    }
-    [Storable]
-    private double manipulatorSigma;
-    public double ManipulatorSigma {
-      get { return manipulatorSigma; }
-      set {
-        if (value < 0) throw new ArgumentException();
-        if (value != manipulatorSigma) {
-          manipulatorSigma = value;
-          OnChanged(EventArgs.Empty);
-        }
-      }
-    }
-    [Storable(DefaultValue = 0.0)]
-    private double multiplicativeManipulatorSigma;
-    public double MultiplicativeManipulatorSigma {
-      get { return multiplicativeManipulatorSigma; }
-      set {
-        if (value < 0) throw new ArgumentException();
-        if (value != multiplicativeManipulatorSigma) {
-          multiplicativeManipulatorSigma = value;
-          OnChanged(EventArgs.Empty);
-        }
-      }
-    }
-
-    private const int minimumArity = 0;
-    private const int maximumArity = 0;
-
-    public override int MinimumArity {
-      get { return minimumArity; }
-    }
-    public override int MaximumArity {
-      get { return maximumArity; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private Constant(StorableConstructorFlag _) : base(_) { }
-    private Constant(Constant original, Cloner cloner)
-      : base(original, cloner) {
-      minValue = original.minValue;
-      maxValue = original.maxValue;
-      manipulatorMu = original.manipulatorMu;
-      manipulatorSigma = original.manipulatorSigma;
-      multiplicativeManipulatorSigma = original.multiplicativeManipulatorSigma;
-    }
-    public Constant()
-      : base("Constant", "Represents a constant value.") {
-      manipulatorMu = 0.0;
-      manipulatorSigma = 1.0;
-      multiplicativeManipulatorSigma = 0.03;
-      minValue = -20.0;
-      maxValue = 20.0;
-    }
-
-    public override ISymbolicExpressionTreeNode CreateTreeNode() {
-      return new ConstantTreeNode(this);
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new Constant(this, cloner);
-    }
-  }
-}
Index: anches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ConstantTreeNode.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/ConstantTreeNode.cs	(revision 18092)
+++ 	(revision )
@@ -1,83 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HEAL.Attic;
-using HeuristicLab.Random;
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [StorableType("247DBD04-18F2-4184-B6F5-6E283BF06FD0")]
-  public sealed class ConstantTreeNode : SymbolicExpressionTreeTerminalNode {
-    public new Constant Symbol {
-      get { return (Constant)base.Symbol; }
-    }
-
-    private double constantValue;
-    [Storable]
-    public double Value {
-      get { return constantValue; }
-      set { constantValue = value; }
-    }
-
-    [StorableConstructor]
-    private ConstantTreeNode(StorableConstructorFlag _) : base(_) { }
-
-    private ConstantTreeNode(ConstantTreeNode original, Cloner cloner)
-      : base(original, cloner) {
-      constantValue = original.constantValue;
-    }
-
-    private ConstantTreeNode() : base() { }
-    public ConstantTreeNode(Constant constantSymbol) : base(constantSymbol) { }
-
-    public override bool HasLocalParameters {
-      get {
-        return true;
-      }
-    }
-    public override void ResetLocalParameters(IRandom random) {
-      base.ResetLocalParameters(random);
-      var range = Symbol.MaxValue - Symbol.MinValue;
-      Value = random.NextDouble() * range + Symbol.MinValue;
-    }
-
-    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
-      base.ShakeLocalParameters(random, shakingFactor);
-      // 50% additive & 50% multiplicative
-      if (random.NextDouble() < 0.5) {
-        double x = NormalDistributedRandom.NextDouble(random, Symbol.ManipulatorMu, Symbol.ManipulatorSigma);
-        Value = Value + x * shakingFactor;
-      } else {
-        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeManipulatorSigma);
-        Value = Value * x;
-      }
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new ConstantTreeNode(this, cloner);
-    }
-
-    public override string ToString() {
-      return constantValue.ToString("E4");
-    }
-  }
-}
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Num.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Num.cs	(revision 18093)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/Num.cs	(revision 18093)
@@ -0,0 +1,128 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HEAL.Attic;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableType("5CD355EA-36E4-4E43-B8C4-9E9CF4CBC860")]
+  [Item("Num", "Represents a constant value.")]
+  public sealed class Num : Symbol {
+    #region Properties
+    [Storable]
+    private double minValue;
+    public double MinValue {
+      get { return minValue; }
+      set {
+        if (value != minValue) {
+          minValue = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double maxValue;
+    public double MaxValue {
+      get { return maxValue; }
+      set {
+        if (value != maxValue) {
+          maxValue = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double manipulatorMu;
+    public double ManipulatorMu {
+      get { return manipulatorMu; }
+      set {
+        if (value != manipulatorMu) {
+          manipulatorMu = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double manipulatorSigma;
+    public double ManipulatorSigma {
+      get { return manipulatorSigma; }
+      set {
+        if (value < 0) throw new ArgumentException();
+        if (value != manipulatorSigma) {
+          manipulatorSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable(DefaultValue = 0.0)]
+    private double multiplicativeManipulatorSigma;
+    public double MultiplicativeManipulatorSigma {
+      get { return multiplicativeManipulatorSigma; }
+      set {
+        if (value < 0) throw new ArgumentException();
+        if (value != multiplicativeManipulatorSigma) {
+          multiplicativeManipulatorSigma = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private Num(StorableConstructorFlag _) : base(_) { }
+    private Num(Num original, Cloner cloner)
+      : base(original, cloner) {
+      minValue = original.minValue;
+      maxValue = original.maxValue;
+      manipulatorMu = original.manipulatorMu;
+      manipulatorSigma = original.manipulatorSigma;
+      multiplicativeManipulatorSigma = original.multiplicativeManipulatorSigma;
+    }
+    public Num()
+      : base("Num", "Represents a constant value.") {
+      manipulatorMu = 0.0;
+      manipulatorSigma = 1.0;
+      multiplicativeManipulatorSigma = 0.03;
+      minValue = -20.0;
+      maxValue = 20.0;
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new NumTreeNode(this);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Num(this, cloner);
+    }
+  }
+}
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/NumTreeNode.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/NumTreeNode.cs	(revision 18093)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/NumTreeNode.cs	(revision 18093)
@@ -0,0 +1,84 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HEAL.Attic;
+using HeuristicLab.Random;
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableType("247DBD04-18F2-4184-B6F5-6E283BF06FD0")]
+  public sealed class NumTreeNode : SymbolicExpressionTreeTerminalNode {
+    public new Num Symbol {
+      get { return (Num)base.Symbol; }
+    }
+
+    private double constantValue;
+    [Storable]
+    public double Value {
+      get { return constantValue; }
+      set { constantValue = value; }
+    }
+
+    [StorableConstructor]
+    private NumTreeNode(StorableConstructorFlag _) : base(_) { }
+
+    private NumTreeNode(NumTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      constantValue = original.constantValue;
+    }
+
+    private NumTreeNode() : base() { }
+    public NumTreeNode(Num numSymbol) : base(numSymbol) { }
+
+    public override bool HasLocalParameters {
+      get {
+        return true;
+      }
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      base.ResetLocalParameters(random);
+      var range = Symbol.MaxValue - Symbol.MinValue;
+      Value = random.NextDouble() * range + Symbol.MinValue;
+    }
+
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      base.ShakeLocalParameters(random, shakingFactor);
+      // 50% additive & 50% multiplicative
+      if (random.NextDouble() < 0.5) {
+        double x = NormalDistributedRandom.NextDouble(random, Symbol.ManipulatorMu, Symbol.ManipulatorSigma);
+        Value = Value + x * shakingFactor;
+      } else {
+        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeManipulatorSigma);
+        Value = Value * x;
+      }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new NumTreeNode(this, cloner);
+    }
+
+    public override string ToString() {
+      return $"<{constantValue:E4}>";
+      // return constantValue.ToString("E4");
+    }
+  }
+}
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/RealConstant.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/RealConstant.cs	(revision 18093)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/RealConstant.cs	(revision 18093)
@@ -0,0 +1,68 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HEAL.Attic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableType("44E03792-5E65-4C70-99B2-7849B8927E28")]
+  [Item("RealConstant", "Represents a number.")]
+  public sealed class RealConstant : Symbol{
+    [Storable]
+    private double minValue;
+    public double MinValue {
+      get { return minValue; }
+      set {
+        if (value != minValue) {
+          minValue = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+    [Storable]
+    private double maxValue;
+    public double MaxValue {
+      get { return maxValue; }
+      set {
+        if (value != maxValue) {
+          maxValue = value;
+          OnChanged(EventArgs.Empty);
+        }
+      }
+    }
+
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private RealConstant(StorableConstructorFlag _) : base(_) { }
+
+    private RealConstant(RealConstant original, Cloner cloner) : base(original, cloner) {
+      minValue = original.minValue;
+      maxValue = original.maxValue;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RealConstant(this, cloner);
+    }
+
+    public RealConstant() : base("RealConstant", "Represents a number.") {
+      minValue = -20.0;
+      maxValue = 20.0;
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new RealConstantTreeNode(this);
+    }
+  }
+}
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/RealConstantTreeNode.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/RealConstantTreeNode.cs	(revision 18093)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/RealConstantTreeNode.cs	(revision 18093)
@@ -0,0 +1,39 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HEAL.Attic;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
+  [StorableType("F91000E6-B041-4648-A9E8-595228F957FA")]
+  public sealed class RealConstantTreeNode : SymbolicExpressionTreeTerminalNode{
+
+    public new RealConstant Symbol {
+      get { return (RealConstant) base.Symbol; }
+    }
+
+    public double Value { get; set; }
+
+    [StorableConstructor]
+    private RealConstantTreeNode(StorableConstructorFlag _) : base(_) { }
+
+    private RealConstantTreeNode(RealConstantTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      Value = original.Value;
+    }
+
+    private RealConstantTreeNode() : base() { }
+    public RealConstantTreeNode(RealConstant realConstantSymbol) : base(realConstantSymbol) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RealConstantTreeNode(this, cloner);
+    }
+
+    public override string ToString() {
+      return $"{Value:E4}";
+    }
+  }
+}
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Transformations/SymbolicExpressionTreeBacktransformator.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Transformations/SymbolicExpressionTreeBacktransformator.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Transformations/SymbolicExpressionTreeBacktransformator.cs	(revision 18093)
@@ -90,5 +90,5 @@
     private ISymbolicExpressionTreeNode CreateNodeFromWeight(ISymbolicExpressionTreeNode transformationTree, VariableTreeNode variableNode) {
       var multiplicationNode = new SymbolicExpressionTreeNode(new Multiplication());
-      multiplicationNode.AddSubtree(new ConstantTreeNode(new Constant()) { Value = variableNode.Weight });
+      multiplicationNode.AddSubtree(new NumTreeNode(new Num()) { Value = variableNode.Weight });
       multiplicationNode.AddSubtree(transformationTree);
       return multiplicationNode;
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Transformations/TransformationToSymbolicTreeMapper.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Transformations/TransformationToSymbolicTreeMapper.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Transformations/TransformationToSymbolicTreeMapper.cs	(revision 18093)
@@ -279,6 +279,6 @@
     }
 
-    private ConstantTreeNode CreateConstantTreeNode(string description, double value) {
-      return new ConstantTreeNode(new Constant()) { Value = value };
+    private NumTreeNode CreateConstantTreeNode(string description, double value) {
+      return new NumTreeNode(new Num()) { Value = value };
     }
 
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.ExternalEvaluation.GP/3.5/ExternalEvaluationExpressionGrammar.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.ExternalEvaluation.GP/3.5/ExternalEvaluationExpressionGrammar.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.ExternalEvaluation.GP/3.5/ExternalEvaluationExpressionGrammar.cs	(revision 18093)
@@ -62,5 +62,5 @@
       var or = new Or();
       var not = new Not();
-      var constant = new Constant();
+      var constant = new Num();
       constant.MinValue = -20;
       constant.MaxValue = 20;
Index: /branches/3140_NumberSymbol/HeuristicLab.Problems.ExternalEvaluation.GP/3.5/ExternalEvaluationSymbolicExpressionTreeStringFormatter.cs
===================================================================
--- /branches/3140_NumberSymbol/HeuristicLab.Problems.ExternalEvaluation.GP/3.5/ExternalEvaluationSymbolicExpressionTreeStringFormatter.cs	(revision 18092)
+++ /branches/3140_NumberSymbol/HeuristicLab.Problems.ExternalEvaluation.GP/3.5/ExternalEvaluationSymbolicExpressionTreeStringFormatter.cs	(revision 18093)
@@ -106,6 +106,6 @@
           var varNode = node as VariableTreeNode;
           strBuilder.AppendFormat("(* {0} {1})", varNode.VariableName, varNode.Weight.ToString("g17", CultureInfo.InvariantCulture));
-        } else if (node.Symbol is Constant) {
-          var constNode = node as ConstantTreeNode;
+        } else if (node.Symbol is Num) {
+          var constNode = node as NumTreeNode;
           strBuilder.Append(constNode.Value.ToString("g17", CultureInfo.InvariantCulture));
         } else {
