Seems this is related to double/decimal deserialization,
I don’t think this is specifically related to the MongoDB C# driver, but instead due to the binary representation of double and float numbers in C#. To elaborate, C# represents double and float numbers in binary, and unable to represent many decimal numbers accurately. Depending on the requested precision of the ToString() conversion, the binary value would be to the closest binary equivalent.
To illustrate, see this simple code:
var x = 0.5710711036366942D;
Console.WriteLine(x.ToString("G17"));
// outputs
// 0.57107110363669422
any idea how to resolve this discrepancy?
If you have control over the input string to be parsed, you could explicitly express the decimal format with NumberDecimal(). For example, you could use