package com.wzh.test;

import java.math.BigDecimal;

public class test {

    /**
     * @param args
     */
    public static void main(String[] args) {

//        double a=0.1;
//        double b=0.006;
//        System.out.println(a+b);
        
        BigDecimal a=new BigDecimal("0.12352352352632362362362366232623");
        BigDecimal b=new BigDecimal("0.006235236532632632362363463463423");
        System.out.println(a.add(b).toString());
        System.out.println(a.multiply(b).toString());
        System.out.println(a.divide(b,10,BigDecimal.ROUND_HALF_UP).toString());
    }

}

 

相关文章:

  • 2021-07-31
  • 2021-05-30
  • 2021-07-09
  • 2021-08-08
  • 2022-02-11
  • 2021-09-26
  • 2022-12-23
猜你喜欢
  • 2021-12-07
  • 2021-06-16
相关资源
相似解决方案