[Mono-bugs] [Bug 42658][Wis] Changed - Bug in Math.Round

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 9 May 2003 22:15:52 -0400 (EDT)


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 jaime@gnome.org.

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

--- shadow/42658	Fri May  9 06:36:37 2003
+++ shadow/42658.tmp.7622	Fri May  9 22:15:52 2003
@@ -1,14 +1,14 @@
 Bug#: 42658
 Product: Mono/Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: gentoo
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: lda@lupa.pl               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -46,6 +46,21 @@
 Parameter name: Value is too small or too big.
 in <0x0004d> 00 System.Math:Round (double,int)
 
 Expected Results:
 
 0   (zero)
+
+------- Additional Comments From jaime@gnome.org  2003-05-09 22:15 -------
+After looking a lot if the bug is in Math.cs or in sysmath.c I really
+think that the bug is else where. Maybe in mcs. 
+
+If you try changing the code to something like this:
+
+double result = 100/l*p;
+Console.WriteLine (Math.Round(result,2));
+
+or just
+
+Console.WriteLine (Math.Round((double) (100/l*p),2));
+
+the program will work fine (printing '0')