On Jan 23, 2015, at 11:51 AM, Andy Fingerhut <andy.finger...@gmail.com> wrote: > Hash consistency is certainly nice, but if Clojure were changed such that (= > float-val double-val) were always false, and no other changes were made, it > would lead to this situation: > > user=> (<= (float 1.5) (double 1.5)) > true > user=> (>= (float 1.5) (double 1.5)) > true > user=> (= (float 1.5) (double 1.5)) > false
I'd argue you should be using == if you care about that particular property. And note that this can already happen with BigDecimals: user=> (>= 10M 10) true user=> (<= 10M 10) true user=> (= 10M 10) false -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.