Here you can find the source of divide(double a, double b)
public static double divide(double a, double b)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; public class Main { public static double divide(double a, double b) { return BigDecimal.valueOf(a).divide(BigDecimal.valueOf(b)).doubleValue(); }/* ww w . j a v a 2 s . c o m*/ }