首页 > 其他 > 详细

BigInteger的使用

时间:2018-02-15 15:03:04      阅读:214      评论:0      收藏:0      [点我收藏+]

【构造方法】

BigInteger(String val) :将 BigInteger 的十进制字符串表示形式转换为 BigInteger。

【常用方法】

1)add(BigInteger val):返回其值为 (this + val) 的 BigInteger。

2)subtract(BigInteger val):返回其值为 (this - val) 的 BigInteger。

3)multiply(BigInteger val):返回其值为 (this * val) 的 BigInteger。

4)divide(BigInteger val):返回其值为 (this / val) 的 BigInteger。

5)divideAndRemainder(BigInteger val) :返回包含 (this / val) 后跟 (this % val) 的两个 BigInteger 的数组。bi[0]为商,bi[1]为余数。

BigInteger的使用

原文:https://www.cnblogs.com/schiller-hu/p/8449503.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!