[Mono-bugs] [Bug 63902][Nor] New - Decimal computation error

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 25 Aug 2004 03:57:11 -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 tocsleung@so-net.com.hk.

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

--- shadow/63902	2004-08-25 03:57:11.000000000 -0400
+++ shadow/63902.tmp.20763	2004-08-25 03:57:11.000000000 -0400
@@ -0,0 +1,54 @@
+Bug#: 63902
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: tocsleung@so-net.com.hk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Decimal computation error
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+after running the following script, the result always come out a long 
+zero suffix.  However, it run correctly under .Net framework.
+
+
+Steps to reproduce the problem:
+
+void Test()
+{	
+  decimal d = new decimal(4711);
+  int scale = 2;
+	
+  for (int i = 0; i < scale; i++) 
+    if (d != 0)
+      d = d /10;
+  System.Console.Writeline("result = [" + d.ToString() + "]");
+}
+
+Actual Results:
+
+result = [47.110000000000000000000000]
+
+
+Expected Results:
+
+result = [47.11]
+
+
+How often does this happen? 
+
+Always
+
+Additional Information: