BigDecimal和BigInteger
java.math.BigDecimal
| BigInteger add(BigInteger other) | 和 |
| BigInteger subtract(BigInteger other) | 差 |
| BigInteger multiply(BigInteger other) | 积 |
| BigInteger divide(BigInteger other) | 商 |
| BigInteger mod(BigInteger other) | 余数 |
| BigInteger sqrt() | 平方根 |
| int compareTo() | |
| static BigInteger valueof(long x) | 返回值等于x的大整数 |
| static BigInteger valueof(String s) | 返回s所代表的大整数 |
java.math.BigInteger
| BigDecimal add(BigDecimal other) | 和 |
| BigDecimal subtract(BigDecimal other) | 差 |
| BigDecimal multiply(BigDecimal other) | 积 |
| BigDecimal divide(BigDecimal other) | 商 如果商是一个无限循环小数,该方法会抛出一个异常。 |
| BigDecimal divide(BigDecimal other,RoundingMode mode) | RoundingMode。HALF_UP |
| int compareTo() |

浙公网安备 33010602011771号