[Mono-bugs] [Bug 60227][Wis] New - System.Decimal class has different behaviour from MS implementation

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 15 Jun 2004 15:40:25 -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 sebastien@ximian.com.

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

--- shadow/60227	2004-06-15 15:40:25.000000000 -0400
+++ shadow/60227.tmp.24716	2004-06-15 15:40:25.000000000 -0400
@@ -0,0 +1,39 @@
+Bug#: 60227
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: sebastien@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Decimal class has different behaviour from MS implementation
+
+The current Decimal class (partly located in the runtime) has several
+"small" problems that cause some of it's results to differ from MS
+implementation. This is a metalist of them for future reference.
+
+Known problems are:
+
+* Bad rounding. The class should use banker's rounding. Current fix is
+non-optimal (actually it's very bad considering the scaling issue).
+
+* Scale issues. Some operations result in scale that aren't the simplest
+possible (e.g. storing 1200 for 1.2 while 12). This cause a problem because
+the Decimal class must keep it's precision for string representation (i.e.
+5 is different from 5.0, 5.00 ...).
+
+* Parsing overflow. Parsing some numbers cause overflow because we parse
+the number as a big integer. The problem is that we must be able to parse
+an "infinite" length of fractions (which will/should be removed at a later
+stage).
+
+Most problems have "temporary" solutions for Mono 1.0 (except scale in some
+cases) but they all affect the class performance.