| Anonymous | Login | Signup for a new account | 2013-05-22 16:32 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0005222 | OCaml | OCaml general | public | 2011-02-09 13:51 | 2012-09-25 20:06 | |||
| Reporter | Pascal Cuoq | |||||||
| Assigned To | xleroy | |||||||
| Priority | normal | Severity | major | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.12.0 | |||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0005222: Hashtbl.hash is not compatible with (=) | |||||||
| Description | According to http://caml.inria.fr/pub/docs/manual-ocaml/libref/Hashtbl.html [^] : Hashtbl.hash x associates a positive integer to any value of any type. It is guaranteed that if x = y or Pervasives.compare x y = 0, then hash x = hash y. But: Objective Caml version 3.12.0 # Hashtbl.hash (+0.) ;; - : int = 0 # Hashtbl.hash (-0.) ;; - : int = 128 # (+0.) = (-0.) ;; - : bool = true # | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0005838) xleroy (administrator) 2011-03-04 16:30 |
Well spotted, thanks. Some normalization of the float is in order before hashing its bits. |
|
(0005935) xleroy (administrator) 2011-05-29 12:10 |
As part of a major overhaul of the generic hash function, fixed the +0.0/-0.0 issue, and also made sure that all NaNs hash to the same value. The code is in SVN trunk and should go into release 3.13. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-02-09 13:51 | Pascal Cuoq | New Issue | |
| 2011-03-04 16:26 | xleroy | Relationship added | related to 0005225 |
| 2011-03-04 16:30 | xleroy | Note Added: 0005838 | |
| 2011-03-04 16:30 | xleroy | Assigned To | => xleroy |
| 2011-03-04 16:30 | xleroy | Status | new => confirmed |
| 2011-05-29 12:10 | xleroy | Note Added: 0005935 | |
| 2011-05-29 12:10 | xleroy | Status | confirmed => resolved |
| 2011-05-29 12:10 | xleroy | Resolution | open => fixed |
| 2012-09-25 20:06 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |