[Mono-bugs] [Bug 70943][Min] New - How to round it. It differs in NET and Mono.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 3 Jan 2005 04:06:28 -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 mei@work.email.ne.jp.

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

--- shadow/70943	2005-01-03 04:06:28.000000000 -0500
+++ shadow/70943.tmp.10248	2005-01-03 04:06:28.000000000 -0500
@@ -0,0 +1,60 @@
+Bug#: 70943
+Product: Mono: Class Libraries
+Version: 1.1
+OS: Windows XP (Cygwin)
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mei@work.email.ne.jp               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: How to round it. It differs in NET and Mono. 
+
+using System;
+
+public class X {
+		public static void Main() {
+				Console.WriteLine(12.05.ToString("##.#"));
+				Console.WriteLine(12.15.ToString("##.#"));
+				Console.WriteLine(12.25.ToString("##.#"));
+				Console.WriteLine(12.35.ToString("##.#"));
+				Console.WriteLine(12.45.ToString("##.#"));
+				Console.WriteLine(12.55.ToString("##.#"));
+				Console.WriteLine(12.65.ToString("##.#"));
+				Console.WriteLine(12.75.ToString("##.#"));
+				Console.WriteLine(12.85.ToString("##.#"));
+				Console.WriteLine(12.95.ToString("##.#"));
+		}
+}
+
+Actual Results:
+> mono xxx.exe
+12.1
+12.2
+12.3
+12.3
+12.4
+12.6
+12.7
+12.8
+12.8
+12.9
+
+Expected Results:
+> xxx.exe
+12.1
+12.2
+12.3
+12.4
+12.5
+12.6
+12.7
+12.8
+12.9
+13