[Mono-bugs] [Bug 70473][Nor] Changed - Jit problem with comparison on result from Math.Round
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 11 Dec 2004 18:33:10 -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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=70473
--- shadow/70473 2004-12-11 18:17:28.000000000 -0500
+++ shadow/70473.tmp.20601 2004-12-11 18:33:10.000000000 -0500
@@ -32,6 +32,40 @@
[benm@omega benm]$ mono t.exe
-0.1 != -0.1
[benm@omega benm]$ mint t.exe
[benm@omega benm]$
So am assuming this is a jit problem, as mint handles it
+
+------- Additional Comments From bmaurer@users.sf.net 2004-12-11 18:33 -------
+Ok, here is some extra info:
+
+[benm@omega benm]$ cat t.cs
+using System;
+
+class X {
+ static void Main ()
+ {
+ double d = -0.123456789;
+ double dd = Math.Round (d, 1);
+ double ddd = -0.1;
+ if (dd != ddd)
+ Console.WriteLine ("{0} != {1}", dd, ddd);
+
+ Console.WriteLine (BitConverter.ToString
+(BitConverter.GetBytes (dd)));
+ Console.WriteLine (BitConverter.ToString
+(BitConverter.GetBytes (ddd)));
+ }
+}
+[benm@omega benm]$ mcs t.cs
+[benm@omega benm]$ mono t.exe
+-0.1 != -0.1
+98-99-99-99-99-99-B9-BF
+9A-99-99-99-99-99-B9-BF
+
+
+C:\Inetpub\ftproot>t
+
+C:\Inetpub\ftproot>t
+9A-99-99-99-99-99-B9-BF
+9A-99-99-99-99-99-B9-BF