[Mono-bugs] [Bug 22082] New - Object.Equals doesn't handle NaN correctly

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
18 Mar 2002 15:57:47 -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 ndrochak@gol.com.

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

--- shadow/22082	Mon Mar 18 10:57:47 2002
+++ shadow/22082.tmp.30278	Mon Mar 18 10:57:47 2002
@@ -0,0 +1,35 @@
+Bug#: 22082
+Product: Mono/Runtime
+Version: unspecified
+OS: Red Hat 7.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ndrochak@gol.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Object.Equals doesn't handle NaN correctly
+
+Object.Equals() should know that two NaN's are equal.
+
+Here's a test case.  It should return 0.
+
+using System;
+
+class X {
+	static int Main (string [] args)
+	{
+		double x = Double.NaN;
+		double y = Double.NaN;
+		if (((Object)x).Equals(y))
+			return 0;
+		else
+			return 1;
+	}
+}