[Mono-bugs] [Bug 33003][Nor] New - Exponent floating point literal bug

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
29 Oct 2002 20:33:41 -0000


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 ariel.ortiz@itesm.mx.

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

--- shadow/33003	Tue Oct 29 15:33:41 2002
+++ shadow/33003.tmp.21882	Tue Oct 29 15:33:41 2002
@@ -0,0 +1,69 @@
+Bug#: 33003
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: Windows XP Professional
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ariel.ortiz@itesm.mx               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Exponent floating point literal bug
+
+Description of Problem:
+The C# compiler doesn't seem to scan corretly floating point literals that
+use a signless exponent. This problem was detected when using the Mono 0.16
+distribution on Windows XP, although I imagine that this problem is OS
+independent.
+
+
+Steps to reproduce the problem:
+
+This program reproduces the bug:
+
+using System;
+
+class Bug {
+    public static void Main (string[] args) {
+        double x = 1.1e20;
+        double y = 1.1e+20;
+        Console.WriteLine(x);
+        Console.WriteLine(y);
+    }
+}
+
+Actual Results:
+
+1.1
+1.1e+020
+
+
+Expected Results:
+
+1.1e+020
+1.1e+020
+
+
+How often does this happen? 
+
+Always, unless the exponent has a sign (positive or negative).
+
+
+Additional Information:
+
+The C# language sepecification says that the sign is optional:
+
+exponent-part: 
+   e sign(opt) decimal-digits
+   E sign(opt) decimal-digits 
+sign: one of 
+   + - 
+
+The programs with this bug compile fine, but the exponent part is just
+ignored if no sign is specified.