Java tutorial
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static Double add(Double v1, Double v2) { BigDecimal b1 = new BigDecimal(v1.toString()); BigDecimal b2 = new BigDecimal(v2.toString()); return Double.valueOf(b1.add(b2).doubleValue()); } }