Here you can find the source of inverse(final BigDecimal amount)
public static BigDecimal inverse(final BigDecimal amount)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.math.RoundingMode; public class Main { public static BigDecimal inverse(final BigDecimal amount) { return amount.equals(BigDecimal.ZERO) ? amount : BigDecimal.ONE.divide(amount, RoundingMode.HALF_EVEN); }//from www . j av a 2s. c o m public static BigDecimal divide(final BigDecimal amount, final BigDecimal divideBy, final int scale) { return amount.setScale(scale, RoundingMode.HALF_EVEN).divide(divideBy, RoundingMode.HALF_EVEN); } }