Details
-
Type:
Defect
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: Release 1.4, Release 1.5
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
Description
user> clojure-version
{:major 1, :minor 5, :incremental 0, :qualifier "beta1"}
user> (== 2.0 2.0M)
true
user> (== 2 2.0M)
false <-- this one is not like the others
user> (== 2 2.0)
true
user> (== 2N 2.0)
true
user> (== 2 (double 2.0M))
true
It's not clear if this is a bug or an enhancement request, Should BigDecimal's be special in comparason to their smaller equivalents?
I understand that the definition of equality between bigDecimals is dependent on both value and scale as in this case:
user> (== 0.000000M 0.0M)
false
I just want to make sure the decission to propagate that semantic across types is intentional. If this is on purpose than this is not a bug.