Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Atlas Search
Created by Guest
Created on Aug 22, 2024

Implement basic aritmetic operations for the Decimal128 datatype

Feature Request: Implement basic aritmetic operations (e.g. addition) for the Decimal128 datatype. Context: I am working with high precision floats in Python and I am storing my data in MongoDB. When I get a high precision float out of MongoDb, I then need to convert it to the native Python decimal datatype before I can do basic arithmetic like addition. It would be great if your Decimal128 datatype supported the same mathematical operations as Python's decmial datatype. I documented this issue and provided sample code to work around the limitations here: https://github.com/NadimGhaznavi/kb/wiki/Handling-Floating-Point-Math-with-Python-and-MongoDb Love your product, keep up the awesome work!!! :)