Index: trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraint.cs
===================================================================
--- trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraint.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraint.cs	(revision 344)
@@ -136,5 +136,5 @@
       XmlNode node = base.GetXmlNode(name, document, persistedObjects);
       XmlAttribute lb = document.CreateAttribute("LowerBound");
-      lb.Value = LowerBound.ToString(CultureInfo.InvariantCulture);
+      lb.Value = LowerBound.ToString("r", CultureInfo.InvariantCulture);
       XmlAttribute lbi = document.CreateAttribute("LowerBoundIncluded");
       lbi.Value = lowerBoundIncluded.ToString();
@@ -142,5 +142,5 @@
       lbe.Value = lowerBoundEnabled.ToString();
       XmlAttribute ub = document.CreateAttribute("UpperBound");
-      ub.Value = upperBound.ToString(CultureInfo.InvariantCulture);
+      ub.Value = upperBound.ToString("r", CultureInfo.InvariantCulture);
       XmlAttribute ubi = document.CreateAttribute("UpperBoundIncluded");
       ubi.Value = upperBoundIncluded.ToString();
Index: trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraintView.cs
===================================================================
--- trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraintView.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Constraints/DoubleBoundedConstraintView.cs	(revision 344)
@@ -69,5 +69,5 @@
         ubEnabledCheckBox.Enabled = false;
       } else {
-        lbTextBox.Text = DoubleBoundedConstraint.LowerBound + "";
+        lbTextBox.Text = DoubleBoundedConstraint.LowerBound.ToString("r");
         lbTextBox.Enabled = DoubleBoundedConstraint.LowerBoundEnabled;
         lbIncludedCheckBox.Checked = DoubleBoundedConstraint.LowerBoundIncluded;
@@ -76,5 +76,5 @@
         lbEnabledCheckBox.Enabled = true;
 
-        ubTextBox.Text = DoubleBoundedConstraint.UpperBound + "";
+        ubTextBox.Text = DoubleBoundedConstraint.UpperBound.ToString("r");
         ubTextBox.Enabled = DoubleBoundedConstraint.UpperBoundEnabled;
         ubIncludedCheckBox.Checked = DoubleBoundedConstraint.UpperBoundIncluded;
Index: trunk/sources/HeuristicLab.Data/ArrayDataBaseView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/ArrayDataBaseView.Designer.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/ArrayDataBaseView.Designer.cs	(revision 344)
@@ -105,5 +105,5 @@
     private System.Windows.Forms.Label sizeLabel;
     private System.Windows.Forms.TextBox lengthTextBox;
-    private System.Windows.Forms.DataGridView dataGridView;
+    protected System.Windows.Forms.DataGridView dataGridView;
   }
 }
Index: trunk/sources/HeuristicLab.Data/ArrayDataBaseView.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/ArrayDataBaseView.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/ArrayDataBaseView.cs	(revision 344)
@@ -64,5 +64,5 @@
         dataGridView.RowCount = length;
         for (int i = 0; i < length; i++) {
-          dataGridView.Rows[i].Cells[0].Value = ArrayDataBase.Data.GetValue(i); ;
+          dataGridView.Rows[i].Cells[0].Value = ArrayDataBase.Data.GetValue(i);
         }
       } else {
Index: trunk/sources/HeuristicLab.Data/ConstrainedDoubleDataView.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/ConstrainedDoubleDataView.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/ConstrainedDoubleDataView.cs	(revision 344)
@@ -62,5 +62,5 @@
       } else {
         dataTextBox.Enabled = true;
-        dataTextBox.Text = ConstrainedDoubleData.ToString();
+        dataTextBox.Text = ConstrainedDoubleData.Data.ToString("r");
       }
     }
Index: trunk/sources/HeuristicLab.Data/DoubleArrayData.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/DoubleArrayData.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/DoubleArrayData.cs	(revision 344)
@@ -65,5 +65,5 @@
       for(int i = 0; i < Data.Length; i++) {
         builder.Append(";");
-        builder.Append(Data[i].ToString(format));
+        builder.Append(Data[i].ToString("r", format));
       }
       if(builder.Length > 0)
Index: trunk/sources/HeuristicLab.Data/DoubleArrayDataView.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/DoubleArrayDataView.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/DoubleArrayDataView.cs	(revision 344)
@@ -37,4 +37,6 @@
     public DoubleArrayDataView() {
       InitializeComponent();
+      // round-trip format for all cells
+      dataGridView.DefaultCellStyle.Format = "r";
     }
     public DoubleArrayDataView(DoubleArrayData doubleArrayData)
Index: trunk/sources/HeuristicLab.Data/DoubleData.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/DoubleData.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/DoubleData.cs	(revision 344)
@@ -54,5 +54,5 @@
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid,IStorable> persistedObjects) {
       XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      node.InnerText = Data.ToString(CultureInfo.InvariantCulture.NumberFormat);
+      node.InnerText = Data.ToString("r", CultureInfo.InvariantCulture.NumberFormat);
       return node;
     }
Index: trunk/sources/HeuristicLab.Data/DoubleDataView.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/DoubleDataView.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/DoubleDataView.cs	(revision 344)
@@ -59,5 +59,5 @@
       } else {
         dataTextBox.Enabled = true;
-        dataTextBox.Text = DoubleData.ToString();
+        dataTextBox.Text = DoubleData.Data.ToString("r");
       }
     }
Index: trunk/sources/HeuristicLab.Data/DoubleMatrixData.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/DoubleMatrixData.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/DoubleMatrixData.cs	(revision 344)
@@ -81,5 +81,5 @@
         for (int j = 0; j < Data.GetLength(1); j++) {
           builder.Append(";");
-          builder.Append(Data[i, j].ToString(format));
+          builder.Append(Data[i, j].ToString("r", format));
         }
       }
Index: trunk/sources/HeuristicLab.Data/DoubleMatrixDataView.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/DoubleMatrixDataView.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/DoubleMatrixDataView.cs	(revision 344)
@@ -37,4 +37,6 @@
     public DoubleMatrixDataView() {
       InitializeComponent();
+      // round-trip format for all cells
+      dataGridView.DefaultCellStyle.Format = "r";
     }
     public DoubleMatrixDataView(DoubleMatrixData doubleMatrixData)
Index: trunk/sources/HeuristicLab.Data/MatrixDataBaseView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Data/MatrixDataBaseView.Designer.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Data/MatrixDataBaseView.Designer.cs	(revision 344)
@@ -132,5 +132,5 @@
     private System.Windows.Forms.Label rowsLabel;
     private System.Windows.Forms.TextBox rowsTextBox;
-    private System.Windows.Forms.DataGridView dataGridView;
+    protected System.Windows.Forms.DataGridView dataGridView;
     private System.Windows.Forms.TextBox columnsTextBox;
     private System.Windows.Forms.Label columnsLabel;
Index: trunk/sources/HeuristicLab.DataAnalysis/Dataset.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAnalysis/Dataset.cs	(revision 335)
+++ trunk/sources/HeuristicLab.DataAnalysis/Dataset.cs	(revision 344)
@@ -201,5 +201,5 @@
         for(int column = 0; column < columns; column++) {
           builder.Append(";");
-          builder.Append(samples[row * columns + column].ToString(format));
+          builder.Append(samples[row * columns + column].ToString("r", format));
         }
       }
@@ -222,5 +222,5 @@
       string s = "";
       for(int i = 0; i < xs.Length; i++) {
-        s += xs[i].ToString(CultureInfo.InvariantCulture) + "; ";
+        s += xs[i].ToString("r", CultureInfo.InvariantCulture) + "; ";
       }
 
Index: trunk/sources/HeuristicLab.DataAnalysis/DatasetView.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAnalysis/DatasetView.cs	(revision 335)
+++ trunk/sources/HeuristicLab.DataAnalysis/DatasetView.cs	(revision 344)
@@ -44,4 +44,8 @@
           { manipulator.Execute(Dataset); }));
       }
+      
+      // format all cells with the round-trip formatter to make sure that values that are exported and imported to
+      // another C# app (HL2) have the same numeric value
+      dataGridView.DefaultCellStyle.Format = "r";
     }
 
Index: trunk/sources/HeuristicLab.DataAnalysis/ManualScalingControl.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAnalysis/ManualScalingControl.cs	(revision 335)
+++ trunk/sources/HeuristicLab.DataAnalysis/ManualScalingControl.cs	(revision 344)
@@ -18,4 +18,8 @@
       cancelButton.Visible = editingAllowed;
       cancelButton.Text = "Cancel";
+
+      // format all cells with the round-trip formatter to make sure that exported and imported values have
+      // the same numeric value
+      dataGridView.DefaultCellStyle.Format = "r";
     }
 
Index: trunk/sources/HeuristicLab.DataAnalysis/SvmExporter.cs
===================================================================
--- trunk/sources/HeuristicLab.DataAnalysis/SvmExporter.cs	(revision 335)
+++ trunk/sources/HeuristicLab.DataAnalysis/SvmExporter.cs	(revision 344)
@@ -109,10 +109,10 @@
         StreamWriter writer = new StreamWriter(filename);
         for(int i = 0; i < dataset.Rows; i++) {
-          writer.Write(dataset.GetValue(i, targetColumn).ToString(CultureInfo.InvariantCulture) + "\t");
+          writer.Write(dataset.GetValue(i, targetColumn).ToString("r", CultureInfo.InvariantCulture) + "\t");
           for(int j = 0; j < dataset.Columns; j++) {
             if(j != targetColumn) {
               double val = dataset.GetValue(i, j);
               if(!double.IsInfinity(val) && !double.IsNaN(val))
-                writer.Write((j + 1) + ":" + val.ToString(CultureInfo.InvariantCulture) + "\t");
+                writer.Write((j + 1) + ":" + val.ToString("r", CultureInfo.InvariantCulture) + "\t");
             }
           }
Index: trunk/sources/HeuristicLab.Functions/BakedFunctionTree.cs
===================================================================
--- trunk/sources/HeuristicLab.Functions/BakedFunctionTree.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Functions/BakedFunctionTree.cs	(revision 344)
@@ -286,5 +286,5 @@
         if(f.data.Count > 0) {
           XmlAttribute dataAttribute = document.CreateAttribute("Data");
-          dataAttribute.Value = GetString<double>(f.data);
+          dataAttribute.Value = GetString(f.data);
           entryNode.Attributes.Append(dataAttribute);
         }
@@ -311,8 +311,8 @@
     }
 
-    private string GetString<T>(IEnumerable<T> xs) where T : IConvertible {
+    private string GetString(IEnumerable<double> xs) {
       StringBuilder builder = new StringBuilder();
-      foreach(T x in xs) {
-        builder.Append(x.ToString(CultureInfo.InvariantCulture) + "; ");
+      foreach(double x in xs) {
+        builder.Append(x.ToString("r", CultureInfo.InvariantCulture) + "; ");
       }
       if(builder.Length > 0) builder.Remove(builder.Length - 2, 2);
Index: trunk/sources/HeuristicLab.Functions/ModelAnalyzerExporter.cs
===================================================================
--- trunk/sources/HeuristicLab.Functions/ModelAnalyzerExporter.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Functions/ModelAnalyzerExporter.cs	(revision 344)
@@ -54,5 +54,5 @@
     public void Visit(Constant constant) {
       double value = ((ConstrainedDoubleData)currentBranch.GetLocalVariable(HeuristicLab.Functions.Constant.VALUE).Value).Data;
-      prefix += currentIndend + "[T]Constant(" + value + ";0;0)";
+      prefix += currentIndend + "[T]Constant(" + value.ToString("r") + ";0;0)";
     }
 
@@ -106,5 +106,5 @@
       double offset = ((ConstrainedIntData)currentBranch.GetLocalVariable(HeuristicLab.Functions.Variable.OFFSET).Value).Data;
 
-      prefix += currentIndend + "[T]Variable(" + weight + ";" + index + ";" + -offset + ")";
+      prefix += currentIndend + "[T]Variable(" + weight.ToString("r") + ";" + index + ";" + -offset + ")";
     }
 
Index: trunk/sources/HeuristicLab.Random/NormalDistributedRandom.cs
===================================================================
--- trunk/sources/HeuristicLab.Random/NormalDistributedRandom.cs	(revision 335)
+++ trunk/sources/HeuristicLab.Random/NormalDistributedRandom.cs	(revision 344)
@@ -516,9 +516,9 @@
 
       XmlNode muNode = document.CreateNode(XmlNodeType.Element, "Mu", null);
-      muNode.InnerText = mu.ToString(CultureInfo.InvariantCulture);
+      muNode.InnerText = mu.ToString("r", CultureInfo.InvariantCulture);
       node.AppendChild(muNode);
 
       XmlNode sigmaNode = document.CreateNode(XmlNodeType.Element, "Sigma", null);
-      sigmaNode.InnerText = sigma.ToString(CultureInfo.InvariantCulture);
+      sigmaNode.InnerText = sigma.ToString("r", CultureInfo.InvariantCulture);
       node.AppendChild(sigmaNode);
 
