[Mono-bugs] [Bug 54303][Nor] New - generated inverted floating point comparisons are not correct
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 12 Feb 2004 16:07:38 -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 vargaz@freemail.hu.
http://bugzilla.ximian.com/show_bug.cgi?id=54303
--- shadow/54303 2004-02-12 16:07:38.000000000 -0500
+++ shadow/54303.tmp.7403 2004-02-12 16:07:38.000000000 -0500
@@ -0,0 +1,41 @@
+Bug#: 54303
+Product: Mono/Compilers
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vargaz@freemail.hu
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: generated inverted floating point comparisons are not correct
+
+Using the following testcase:
+
+ double a = Double.NaN;
+
+ if (a == a)
+ Console.WriteLine ();
+ if (a < a)
+ Console.WriteLine ();
+ if (a > a)
+ Console.WriteLine ();
+ }
+
+here, mcs generates the following branches:
+bne.un
+bge
+ble
+
+csc generates the following (correct) branches:
+bne.un
+bge.un
+ble.un
+
+since the negation of 'lesser' is 'greater-or-equal-or-unordered'