0
点赞
收藏
分享

微信扫一扫

Guava系列:BigIntegerMath/LongMath/IntMath使用方法

深夜瞎琢磨 2022-01-31 阅读 31
idejava


场景

BigIntegerMath/LongMath/IntMath


demo

package com.nio4444.demo;

import com.google.common.math.BigIntegerMath;
import com.google.common.math.IntMath;
import com.google.common.math.LongMath;

import java.math.BigInteger;
import java.math.RoundingMode;

public class IntMathDemo {
public static void main(String[] args) {
System.out.println(BigIntegerMath.divide(BigInteger.TEN, new BigInteger("2"), RoundingMode.UNNECESSARY));
System.out.println( LongMath.divide(343,22, RoundingMode.FLOOR)) ;
IntMath.checkedAdd(2000000000,999999999) ;
}
}

Guava系列:BigIntegerMath/LongMath/IntMath使用方法_java


举报

相关推荐

0 条评论