[Mono-bugs] [Bug 72955][Wis] New - double.ToString("R") gives unexpected result

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 24 Feb 2005 05:19:04 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=72955

--- shadow/72955	2005-02-24 05:19:04.000000000 -0500
+++ shadow/72955.tmp.410	2005-02-24 05:19:04.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 72955
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: atsushi@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: double.ToString("R") gives unexpected result
+
+(Maybe) our double.ToString("R") gives non-roundtrippable result.
+
+The next code is manually folded, so join the numeric lines into one line.
+
+--------
+using System;
+
+public class Test
+{
+        public static void Main ()
+        {
+        double d = 0.0000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000
+000000000000000000000222;
+        Console.Out.WriteLine (d.ToString ("R"));
+        Console.Out.WriteLine (d.ToString ());
+        }
+}
+
+Actually there is another mcs bug that rejects to parse this
+code. So I put csc-compiled executable here:
+http://monkey.workarea.jp/tmp/20050224/doubleround.exe
+
+Run the executable with mono.
+
+Actual Results:
+$ mono ./doubleround.exe
+1.9762625833649862E-323
+1.97626258336499E-323
+
+Expected Results:
+$ ./doubleround.exe
+1.97626258336499E-323
+1.97626258336499E-323
+
+How often does this happen? 
+- consistently.
+
+Additional Information:
+- Another XSLT problem depends on it.