且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Swift 中的 BigInteger 等价物?

更新时间:2022-06-13 15:16:35

您可以使用 Cocoa 的 NSDecimalNumber 类.它不是无限精度,但可以表示精度的 38 位十进制数字,这可能足以满足您的需要.

You can use the NSDecimalNumber class from Cocoa. It is not infinite precision, but it can represent 38 decimal digits of precision, which may be enough for what you need.