Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004151OCamlOCaml documentationpublic2006-11-07 17:282009-08-28 11:06
ReporterColas 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.11.2+dev 
Summary0004151: NaN, min & max
Descriptionmin and max behaviour on the uncomparable float NaN is not documented.

From the documentation on compare, "max 0. nan" may:
 - raise an error: "the comparison predicates treat nan as different from any other float value, including itself"
 - return 0.: "compare treats nan as equal to itself and less than any other float value"

or return nan: "any operation with nan as argument returns nan as result"
(introduction of Floating-point arithmetic section)

It does none of the above, and change between 3.08.3 and 3.09.2 without being in the changelog:
        Objective Caml version 3.08.3

# max 0. nan;;
- : float = nan
# max nan 0.;;
- : float = 0.
# min 0. nan;;
- : float = nan
# min nan 0.;;
- : float = 0.

_____________

        Objective Caml version 3.09.2

# max 0. nan;;
- : float = nan
# max nan 0.;;
- : float = 0.
# min 0. nan;;
- : float = 0.
# min nan 0.;;
- : float = nan



--
Colas
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0005063)
xleroy (administrator)
2009-08-28 11:06

Clarified documentation in 3.11 release branch.

- Issue History
Date Modified Username Field Change
2006-11-07 17:28 Colas New Issue
2006-11-15 13:15 doligez Status new => acknowledged
2009-08-28 11:06 xleroy Note Added: 0005063
2009-08-28 11:06 xleroy Status acknowledged => closed
2009-08-28 11:06 xleroy Resolution open => fixed
2009-08-28 11:06 xleroy Fixed in Version => 3.11.2+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker