Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
Description
See http://docs.mongodb.org/manual/reference/operator/update/mul/#multiply-the-value-of-a-field
The example uses a document with the structure:
{ _id: 1, item: "ABC", price: 10.99 }
|
While the result of the $mul operator results in an obviously incorrect price value, we don't explain why it might not be a good idea to use floating point as a representation of price. Perhaps the message is too subtle?
See http://stackoverflow.com/questions/3730019/why-not-use-double-or-float-to-represent-currency