C# 中的任意精度小数
Possible Duplicates:
Big integers in C#
C# unlimited significant decimal digits (arbitrary precision) without java
I read the question at Arbitrary precision decimals in C#? but I don't have the J# library. I need a library for arbitrary precision decimals with C#.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以基于 .NET 4.0 的 BigInteger 类实现您自己的。我这样做是为了好玩,它只做乘法:
...
You could implement your own based on .NET 4.0's BigInteger class. I did this for fun, it does multiplication only:
...
大十进制:
大整数(如果您就像 JD 的解决方案,或者想要提出一个有理数/分数类型类,但我不知何故错过了您正在寻找小数,而不是整数):
Big Decimal:
Big Int (If you like J.D.'s solution, or want to come up with a rational number/fraction type class. That, and I somehow missed that you were looking for decimals, not ints):
只要您不介意使用 GMP,.NET 总会有 GNU MP 包装器。
There's always the GNU MP wrapper for .NET as long as you don't mind using the GMP.