Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006143OCamlOCaml standard librarypublic2013-08-28 15:262013-08-28 16:27
Reporterfrisch 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006143: A reflexive version of the structural equality
DescriptionBecause of the IEEE 754 semantics, the generic structural equality is not a reflexive binary relation. In some cases, it would be useful to have access to a variant of this relation where 'x = x' holds for any x. There is some flexibility for the exact definition for 'nan' (all are 'nan' value equals, or do we compare the bits).

What about providing such a variant in Pervasives, implemented by passing an additional flag to the C implementation?
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0010250)
xleroy (administrator)
2013-08-28 15:46

Such a reflexive structural equality already exists: Pervasive.compare x y = 0. It compares all NaNs equal, and less than any other float value.
(0010253)
frisch (developer)
2013-08-28 16:27

Ah, thanks, I forgot about it! Would it make sense to expose it as an equality function (maybe an operator) as Pervasives?

- Issue History
Date Modified Username Field Change
2013-08-28 15:26 frisch New Issue
2013-08-28 15:46 xleroy Note Added: 0010250
2013-08-28 15:46 xleroy Status new => resolved
2013-08-28 15:46 xleroy Resolution open => no change required
2013-08-28 16:27 frisch Note Added: 0010253


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker