Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/29/09 14:56:51 (15 years ago)
Author:
epitzer
Message:

Updated handling of floating and fixed point numbers, faster and more accurate serialization and parsing. (#646)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/DoubleList2XmlSerializer.cs

    r1940 r1958  
    33using System;
    44using HeuristicLab.Persistence.Core;
    5 using System.Globalization;
     5using HeuristicLab.Persistence.Default.Xml.Primitive;
    66
    77namespace HeuristicLab.Persistence.Default.Xml.Compact {
     
    1818
    1919    protected override string FormatValue(object o) {
    20       return ((double)o).ToString("r", CultureInfo.InvariantCulture);
     20      return Double2XmlSerializer.FormatG17((double)o);
    2121    }
    2222
    2323    protected override object ParseValue(string o) {
    24       if (o == CultureInfo.InvariantCulture.NumberFormat.NaNSymbol)
    25         return double.NaN;
    26       return double.Parse(o, CultureInfo.InvariantCulture);
     24      return Double2XmlSerializer.ParseG17(o);
    2725    }
    2826
Note: See TracChangeset for help on using the changeset viewer.