JAVA BigInteger

java.math包中有两个很有用的类:BigInteger(整数)和BigDecimal(浮点数),这两个类可以处理包含任意长度数字序列的值。

声明:BigInteger a = BigInteger.valueOf(100);

一些API:
BigInteger add(BigInteger other)
BigInteger subtract(BigInteger other)
BigInteger multiply(BigInteger other)
BigInteger divide(BigInteger other)
BigInteger mod(BigInteger other)
int compareTo(BigInteger other) //相等返回0,小于返回负数,大于返回正数
static BigInteger valueOf(long x) //返回值等于x的大整数

 BigDecimal与BigInteger相仿只是在valueof方法中多了一个

static BigDecimal valueOf(long x, int scale)//返回x/(10^scale)
诸位正值青春年少,一定恣情放纵,贪恋香艳梅施之情,喜欢风流雅韵之事,洒脱木拘。然而诸位可知,草上露一碰即落,竹上霜一触即溶,此种风情难于长久。
原文地址:https://www.cnblogs.com/shilipojianshen/p/12718201.html