大的数字与分数支持 [英] Big numbers with fraction support

查看:117
本文介绍了大的数字与分数支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个C#号的东西,可以处理非常大的数字,但也部分支持,我看着System.Numberics.BigInteger即将在.NET 4.0中,但我不能让它与部分工作。

 东西我= 2; 
的东西J = 5;
的东西K = 1 / J; //应为0.4

当我试图

 的BigInteger我= 2; 
BigInteger的J = 5;
双D =(双)(I / J,); // d为0.0



有谁知道这样的图书馆吗?


< DIV CLASS =h2_lin>解决方案

我曾经用这个库:
W3B .Sine 。它是:




在C#开发的一个任意精度的十进制数




您也可以尝试 HTTP:// WWW .fractal-landscapes.co.uk / bigint.html 。不过,我使用它没有经验。


I need a c# number something that can handle very large numbers but also fraction support, I looked at System.Numberics.BigInteger coming in .NET 4.0 but I can't get it to work with fractions.

something i = 2;
something j = 5;
something k = i/j; //should be 0.4

when i tried

 BigInteger i = 2;
 BigInteger j = 5;
 double d = (double)(i/j); //d is 0.0

Does anybody know such a library?

解决方案

I once used this library: W3b.Sine. It's:

An arbitrary-precision decimal number library developed in C#.

You could also try http://www.fractal-landscapes.co.uk/bigint.html. However, I have no experience using it.

这篇关于大的数字与分数支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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