[Mono-bugs] [Bug 627064] New: String.Format with double gives different output between Mono and dotNet

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jul 30 11:06:28 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=627064

http://bugzilla.novell.com/show_bug.cgi?id=627064#c0


           Summary: String.Format with double gives different output
                    between Mono and dotNet
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: i386
        OS/Version: RHEL 5
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: arnaud.marant at c-s.fr
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.8)
Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)

String.Format with double gives different output between Mono and dotNet

The example here : http://pastebin.com/L59Hi5re

using System;
namespace Example
{
   public class HelloWorld
   {
      public static void Main(string[] args)
      {
    //double d = 12.64668994173535;
    double d = 10.00000000000005;
    Console.WriteLine(string.Format("{0}",d));
      }
   } 
}


Reproducible: Always

Steps to Reproduce:
1. compile example
2. test in mono
3. test in dotnet
Actual Results:  
10,0000000000001 in mono

Expected Results:  
10 in dotnet.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list