Here you can find the source of addBigDec(BigDecimal b1, BigDecimal b2)
public static BigDecimal addBigDec(BigDecimal b1, BigDecimal b2)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static BigDecimal addBigDec(BigDecimal b1, BigDecimal b2) { return b1.add(b2); }//from w ww .ja v a 2 s . co m public static double add(double d1, double d2) { BigDecimal b1 = new BigDecimal(d1); BigDecimal b2 = new BigDecimal(d2); return b1.add(b2).doubleValue(); } }