-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.6.10, 3.2.0-rc0
-
Component/s: Aggregation Framework
-
Labels:None
-
Fully Compatible
-
ALL
-
If I use $sum to add some simple floating point numbers together in MongoDB 2.6 or 3.2 I see really odd rounding.
db.b.insert({a:1.1}) db.b.insert({a:0.1}) db.b.aggregate({$group:{_id:true,t:{$sum:"$a"}}}) { "_id" : true, "t" : 1.2000000000000002 }
Same applies to 3.3 + 3.9 = 7.199999999999999