I am using MongoDB to do some calculations as per below. Creating one collection called "Numbers" Insert a big number let's say 2^64 ( we can store this big as MongoDB support decimal128 as default data type)
// inserting  
db.numbers.insertOne({newBig: 1298074200000000000000000000000000})
// converting 
db.numbers.aggregate({$addFields:{test: {$toString: "$newBig"}}})
Now when I am converting the above number to a string, it's not giving expected results.
// getting following output 
[{
    _id: ObjectId("61c2c1557d78b0f039bcee5a"),
    newBig: 1.2980742e+33,
    test: '1.29807e+33'
}]
As pointers, M I missing something here? Please acknowledge, thanks :)