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

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 9 May 2003 06:36:37 -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 lda@lupa.pl.

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

--- shadow/42658	Fri May  9 06:36:37 2003
+++ shadow/42658.tmp.30595	Fri May  9 06:36:37 2003
@@ -0,0 +1,51 @@
+Bug#: 42658
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: gentoo
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lda@lupa.pl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Bug in Math.Round
+
+Description of Problem:
+Bug in Math.Round in mono 0.24
+
+Steps to reproduce the problem:
+
+Compile and run this code
+------------------------------------
+using System;
+using Mono.Math;
+                                                                          
+     
+class Pierwszy
+{
+    static void Main()
+    {
+        // wypisanie tekstu
+        long l = 341626;
+        long p = 0;
+        Console.WriteLine(Math.Round(100.0/l*p,2));
+    }
+}
+------------------------------------
+
+Actual Results:
+
+Unhandled Exception: System.ArgumentOutOfRangeException: Argument is out of
+range
+Parameter name: Value is too small or too big.
+in <0x0004d> 00 System.Math:Round (double,int)
+
+Expected Results:
+
+0   (zero)