C# unlimited significant decimal digits (arbitrary precision) without java [duplicate]

霸气de小男生 提交于 2020-01-27 08:46:16

问题


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.


回答1:


See What is the equivalent of the Java BigDecimal class 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.



来源:https://stackoverflow.com/questions/4160988/c-sharp-unlimited-significant-decimal-digits-arbitrary-precision-without-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!