DocumentDb和浮点截断

时间:2016-12-16 14:46:47

标签: c# double ieee-754 azure-cosmosdb truncation

您好我正在使用DocumentDb并正在将一些数据迁移到其中。我看到DocumentDb被截断了" 8.333333333333333333333333333"进入" 8.33333333333334"。

我理解DocumentDb支持:我理解的https://en.wikipedia.org/wiki/Double-precision_floating-point_format标准与C#Double相同吗?

但如果我运行double.Parse(" 8.333333333333333333333333333")我得到" 8.3333333333333339"。

我的主要问题是我希望能够像DocumentDb一样使用C#代码进行相同的截断。但我不明白怎么做。

0 个答案:

没有答案
相关问题