Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006143OCamlstandard librarypublic2013-08-28 15:262015-12-11 19:23
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusclosedResolutionno 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
xleroy (administrator)
2013-08-28 15:46

Such a reflexive structural equality already exists: x y = 0. It compares all NaNs equal, and less than any other float value.
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
2015-12-11 19:23 xleroy Status resolved => closed
2017-02-23 16:43 doligez Category OCaml standard library => standard library

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker