Here you can find the source of divide(BigDecimal numerator, BigDecimal denominator)
public static BigDecimal divide(BigDecimal numerator, BigDecimal denominator)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; import java.math.MathContext; public class Main { private static MathContext context = MathContext.DECIMAL32; public static BigDecimal divide(BigDecimal numerator, BigDecimal denominator) { return numerator.divide(denominator, context); }// ww w . j a v a 2 s .co m public static BigDecimal divide(BigDecimal numerator, int denominator) { return divide(numerator, BigDecimal.valueOf(denominator)); } public static BigDecimal divide(BigDecimal numerator, double denominator) { return divide(numerator, BigDecimal.valueOf(denominator)); } public static BigDecimal divide(int numerator, int denominator) { return divide(BigDecimal.valueOf(numerator), denominator); } }