core min and max should behave predictably when args include NaN

Description

The min and max functions in clojure.core behave unpredictably when one or more of their arguments is Float/NaN or Double/NaN. This is because the current implementation assumes that > provides a total ordering, but this is not the case when NaN is added to the mix. This is an unfortunate fact of life when dealing with IEEE floating point numbers.

See also the recent mailing list thread "clojure.core/max and NaN".

May be related to issue CLJ-738.

Environment

None

Assignee

Ben Smith-Mannschott

Reporter

Ben Smith-Mannschott

Labels

None

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Priority

Minor
Configure