Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs	(revision 1957)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleArray2XmlSerializer.cs	(revision 1958)
@@ -1,5 +1,5 @@
 ﻿using System;
 using HeuristicLab.Persistence.Core;
-using System.Globalization;
+using HeuristicLab.Persistence.Default.Xml.Primitive;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
@@ -8,11 +8,9 @@
 
     protected override string FormatValue(object o) {
-      return ((double)o).ToString("r", CultureInfo.InvariantCulture);
+      return Double2XmlSerializer.FormatG17((double)o);
     }
 
     protected override object ParseValue(string o) {
-      if (o == CultureInfo.InvariantCulture.NumberFormat.NaNSymbol)
-        return double.NaN;
-      return double.Parse(o, CultureInfo.InvariantCulture);
+      return Double2XmlSerializer.ParseG17(o);
     }
   }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs	(revision 1957)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs	(revision 1958)
@@ -3,5 +3,5 @@
 using System;
 using HeuristicLab.Persistence.Core;
-using System.Globalization;
+using HeuristicLab.Persistence.Default.Xml.Primitive;
 
 namespace HeuristicLab.Persistence.Default.Xml.Compact {
@@ -18,11 +18,9 @@
 
     protected override string FormatValue(object o) {
-      return ((double)o).ToString("r", CultureInfo.InvariantCulture);
+      return Double2XmlSerializer.FormatG17((double)o);
     }
 
     protected override object ParseValue(string o) {
-      if (o == CultureInfo.InvariantCulture.NumberFormat.NaNSymbol)
-        return double.NaN;
-      return double.Parse(o, CultureInfo.InvariantCulture);
+      return Double2XmlSerializer.ParseG17(o);
     }
 
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs	(revision 1957)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Decimal2XmlSerializer.cs	(revision 1958)
@@ -7,5 +7,28 @@
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
 
-  public class Decimal2XmlSerializer : DecimalNumber2XmlSerializerBase<decimal> { }
+  public class Decimal2XmlSerializer : PrimitiveXmlSerializerBase<decimal> {
 
+    public static decimal ParseG30(string s) {
+      decimal d;
+      if (decimal.TryParse(s,
+        NumberStyles.AllowDecimalPoint |
+        NumberStyles.AllowExponent |
+        NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out d))
+        return d;
+      throw new FormatException(
+        String.Format("Invalid decimal G30 number format \"{0}\" could not be parsed", s));
+    }
+
+    public static string FormatG30(decimal d) {
+      return d.ToString("g30", CultureInfo.InvariantCulture);
+    }
+
+    public override XmlString Format(decimal d) {
+      return new XmlString(FormatG30(d));
+    }
+
+    public override decimal Parse(XmlString t) {
+      return ParseG30(t.Data);
+    }
+  }
 }
Index: unk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlSerializerBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/DecimalNumber2XmlSerializerBase.cs	(revision 1957)
+++ 	(revision )
@@ -1,41 +1,0 @@
-﻿using System;
-using HeuristicLab.Persistence.Core;
-using HeuristicLab.Persistence.Interfaces;
-using System.Reflection;
-using System.Globalization;
-
-namespace HeuristicLab.Persistence.Default.Xml.Primitive {
-
-  public abstract class DecimalNumber2XmlSerializerBase<T> : PrimitiveXmlSerializerBase<T> {
-
-    private static MethodInfo ToStringMethod = typeof(T)
-      .GetMethod(
-        "ToString",
-        BindingFlags.Instance | BindingFlags.Public,
-        null,
-        CallingConventions.Standard,
-        new[] { typeof(string), typeof(IFormatProvider) },
-        null);
-
-    private static MethodInfo ParseMethod = typeof(T)
-      .GetMethod(
-        "Parse",
-        BindingFlags.Static | BindingFlags.Public,
-        null,
-        CallingConventions.Standard,
-        new[] { typeof(string), typeof(IFormatProvider) },
-        null);
-
-    public override XmlString Format(T t) {
-      return new XmlString((string)ToStringMethod.Invoke(t, new object[] { "r", CultureInfo.InvariantCulture }));
-    }
-
-    public override T Parse(XmlString x) {
-      try {
-        return (T)ParseMethod.Invoke(null, new object[] { x.Data, CultureInfo.InvariantCulture });
-      } catch (Exception e) {
-        throw new PersistenceException("Could not parse decimal number.", e);
-      }
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs	(revision 1957)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Double2XmlSerializer.cs	(revision 1958)
@@ -7,5 +7,32 @@
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
 
-  public class Double2XmlSerializer : DecimalNumber2XmlSerializerBase<double> { }
+  public class Double2XmlSerializer : PrimitiveXmlSerializerBase<double> {
+
+    public static double ParseG17(string s) {
+      double d;
+      if (double.TryParse(s,
+        NumberStyles.AllowDecimalPoint |
+        NumberStyles.AllowExponent |
+        NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out d))
+        return d;
+      throw new FormatException(
+        String.Format("Invalid G17 number format \"{0}\" could not be parsed", s));
+    }
+
+    public static string FormatG17(double d) {
+      return d.ToString("g17", CultureInfo.InvariantCulture);
+    }
+
+    public override XmlString Format(double d) {
+      return new XmlString(FormatG17(d));
+    }
+
+    public override double Parse(XmlString t) {
+      return ParseG17(t.Data);
+    }
+  }
+
+  
+  
 
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs	(revision 1957)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/Float2XmlSerializer.cs	(revision 1958)
@@ -7,5 +7,28 @@
 namespace HeuristicLab.Persistence.Default.Xml.Primitive {
 
-  public class Float2XmlSerializer : DecimalNumber2XmlSerializerBase<float> { }
+  public class Float2XmlSerializer : PrimitiveXmlSerializerBase<float> {
 
+    public static float ParseG8(string s) {
+      float f;
+      if (float.TryParse(s,
+        NumberStyles.AllowDecimalPoint |
+        NumberStyles.AllowExponent |
+        NumberStyles.AllowLeadingSign, CultureInfo.InvariantCulture, out f))
+        return f;
+      throw new FormatException(
+        String.Format("Invalid float G8 number format \"{0}\" could not be parsed", s));
+    }
+
+    public static string FormatG8(float f) {
+      return f.ToString("g8", CultureInfo.InvariantCulture);
+    }
+
+    public override XmlString Format(float f) {
+      return new XmlString(FormatG8(f));
+    }
+
+    public override float Parse(XmlString t) {
+      return ParseG8(t.Data);
+    }
+  }
 }
Index: /trunk/sources/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj	(revision 1957)
+++ /trunk/sources/HeuristicLab.Persistence/3.3/HeuristicLab.Persistence-3.3.csproj	(revision 1958)
@@ -151,5 +151,4 @@
     <Compile Include="Default\Xml\Primitive\DateTime2XmlSerializer.cs" />
     <Compile Include="Default\Xml\Primitive\Decimal2XmlSerializer.cs" />
-    <Compile Include="Default\Xml\Primitive\DecimalNumber2XmlSerializerBase.cs" />
     <Compile Include="Default\Xml\Primitive\Double2XmlSerializer.cs" />
     <Compile Include="Default\Xml\Primitive\Float2XmlSerializer.cs" />
