[Mono-bugs] [Bug 40658][Nor] New - Floating point formatted differently than Rotor
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Wed, 2 Apr 2003 03:10:29 -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 mathpup@mylinuxisp.com.
http://bugzilla.ximian.com/show_bug.cgi?id=40658
--- shadow/40658 Wed Apr 2 03:10:29 2003
+++ shadow/40658.tmp.6066 Wed Apr 2 03:10:29 2003
@@ -0,0 +1,60 @@
+Bug#: 40658
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: mathpup@mylinuxisp.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Floating point formatted differently than Rotor
+
+Description of Problem:
+
+When Rotor needs to round a floating-point number for display purposes, it appears
+to use the "conventional" rounding that most people use rather than the IEEE
+rounding that Math.Round requires. To be specific, rounding to 3 decimal places,
+Math.Round would turn 1.234567 into 1.234. However, the rounding for display
+purposes, triggered by String.Format, rounds 1.234567 to 1.235 for display on
+Rotor. Mono uses Math.Round for rounding formatted output, so it outputs 1.234.
+
+Test program:
+
+using System;
+
+public class Testing
+{
+ public static void Main()
+ {
+ Console.WriteLine( "{0:N3}", 1.234567 );
+ }
+}
+
+
+
+Steps to reproduce the problem:
+1. mcs format.cs
+2. mono format.exe
+
+Actual Results:
+
+1.234
+
+
+Expected Results:
+
+1.235
+
+
+How often does this happen?
+
+Always
+
+Additional Information: