[Mono-bugs] [Bug 58792][Wis] Changed - GetHashCode for Single, Double and Decimal aren't optimal

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 21 May 2004 10:43:31 -0400 (EDT)


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 sebastien@ximian.com.

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

--- shadow/58792	2004-05-21 10:24:42.000000000 -0400
+++ shadow/58792.tmp.32105	2004-05-21 10:43:29.000000000 -0400
@@ -2,22 +2,22 @@
 Product: Mono: Class Libraries
 Version: unspecified
 OS: All
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Wishlist
 Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: sebastien@ximian.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: GetHashCode for Single and Double isn't optimal
+Summary: GetHashCode for Single, Double and Decimal aren't optimal
 
 Description of Problem:
 
 The hash code generated isn't uniformely distributed.
 
 
@@ -25,6 +25,9 @@
 
 Current source code for both is:
 return (int) m_value;
 
 Where m_value is either a float or double. So 1.0, 1.1, 1.11 ... all get
 the same hash code.
+
+------- Additional Comments From sebastien@ximian.com  2004-05-21 10:42 -------
+Decimal isn't great either with "return (int)lo32;"