[Mono-bugs] [Bug 36357][Wis] New - Casting of decimal.MaxValue into a double creates strange result.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Mon, 6 Jan 2003 16:16:13 -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 kelk1@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=36357
--- shadow/36357 Mon Jan 6 16:16:13 2003
+++ shadow/36357.tmp.17681 Mon Jan 6 16:16:13 2003
@@ -0,0 +1,55 @@
+Bug#: 36357
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Mandrake 9.0
+OS Details: Cooker
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: kelk1@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Casting of decimal.MaxValue into a double creates strange result.
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Casting of decimal.MaxValue into a double creates strange result.
+
+Steps to reproduce the problem:
+1. Build and run the following code:
+
+using System ;
+
+ class SimpleTypes
+{
+ static void Main()
+ {
+ Console.WriteLine("MaxDecim = {0}", decimal.MaxValue) ;
+ Console.WriteLine("MaxDecim = {0}", (double)decimal.MaxValue) ;
+ }
+}
+
+Actual Results:
+MaxDecim = 79228162514264337593543950335
+MaxDecim = 1.98070406285661e+28
+
+Expected Results:
+MaxDecim = 79228162514264337593543950335
+MaxDecim = 7.92281625142643e+28
+
+How often does this happen?
+Always
+
+Additional Information:
+mono-0.17
+libgc1-6.1
+
+Less than newbie level, so please forgive me if:
+1. It is a known problem,
+2. I am making something wrong or it is expected behaviour.