C#无限显著小数位数(任意精度)没有Java [英] C# unlimited significant decimal digits (arbitrary precision) without java
问题描述
可能重复:结果
的什么是java类等价的:BigDecimal的在c#
块引用>
我知道在这个岗位:在C#中任意精度小数?说,使用java.math.BigDecimal的,但我没有安装J#。我将如何实现在C#中任意精度?我想用二进制字符串,但乘以二时,我可能会遇到一些麻烦。
解决方案您可以创建自己的BigDecimal所使用的BigInteger在幕后,保持轨道,其中小数点将需要。
Possible Duplicate:
what is the equivalent for java class : BigDecimal in c#I know in this post: Arbitrary precision decimals in C#? says to use java.math.BigDecimal, but I don't have J# installed. How would I achieve arbitrary precision in C#? I was thinking of using binary strings but I may run into some trouble when multiplying the two.
解决方案See what is the equivalent for java class : BigDecimal in c#
You could create your own BigDecimal that used BigInteger under the covers and kept track of where the decimal point would need to be.
这篇关于C#无限显著小数位数(任意精度)没有Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!