需要C尖锐的Bigdecimal类 [英] Bigdecimal Class For C sharp Needed

查看:44
本文介绍了需要C尖锐的Bigdecimal类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喂。像Java这样的C sharp中是否有任何bigdecimal类?我需要C sharp的bigdecimal类。

Hallo. Is there any bigdecimal class in C sharp like java? I need bigdecimal class for C sharp.

推荐答案

我还没有看到任何,但BigIntegers有一些选项,你可以很容易地用来制作一个具有重载的ToString十进制表示的BigFraction类型:



1) BigInt [ ^ ],I写了这个,它有一个坚实的.NET接口,允许真正任意大小的BigIntegers,并且相当快。



2)C# BigInteger类 [ ^ ],这个实现非常快,但是有一个固定的大小,因此可能会导致浪费内存和内存溢出异常,具体取决于你正在做什么。此外,界面与其他.NET数字类型不完全统一。



3)BigInteger Library [ ^ ],这是新的,采用类似的方法(2)



4) J#BigInteger [ ^ ],微软自己的J#实现。缺点:它是一个引用类型,驼峰大小写,没有运算符重载,必须分发J#运行时。



5)GNU MP Bignum.NET Wrapper [ ^ ],GNU MP Bignum Library的包装器。缺点:使用不安全的代码。
I haven't seen any, but there are a few options for BigIntegers, which you could fairly easily use to make a BigFraction type with an overloaded ToString decimal representation:

1) BigInt[^], I wrote this one and it has a solid .NET interface, allows truly arbitrary size BigIntegers, and is reasonably fast.

2) C# BigInteger Class[^], this implementation is very fast but has a fixed sized which consequently can lead to wasted memory and memory overflow exceptions depending on what you are doing. Also, the interface isn't quite unified with other .NET numeric types.

3) BigInteger Library[^], this ones new and takes a similar approach to (2)

4) J# BigInteger[^], Microsoft's own implementation for J#. Drawbacks: it's a reference type, camel-case, no operator overloading, have to distribute J# runtime.

5) GNU MP Bignum.NET Wrapper[^], a wrapper around the GNU MP Bignum Library. Drawback: uses unsafe code.


.NET 框架 4 BigInteger 结构[ ^ ]。


Double [ ^ ]


这篇关于需要C尖锐的Bigdecimal类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆