你如何处理比UINT64较大的数字(C#) [英] How do you deal with numbers larger than UInt64 (C#)

查看:873
本文介绍了你如何处理比UINT64较大的数字(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中,怎么能存储和与显著超过UINT64的最大值(18,446,744,073,709,551,615)的数值来计算?

In C#, how can one store and calculate with numbers that significantly exceed UInt64's max value (18,446,744,073,709,551,615)?

推荐答案

通过使用一个BigInteger类;有一个在的J#库(从C#绝对访问),另一个在F#(需要测试这一项),并有独立实现如在纯C#这一个

By using a BigInteger class; there's one in the the J# libraries (definitely accessible from C#), another in F# (need to test this one), and there are freestanding implementations such as this one in pure C#.

这篇关于你如何处理比UINT64较大的数字(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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