Java BigDecimal Multiply mul(BigDecimal d1, BigDecimal d2)

Here you can find the source of mul(BigDecimal d1, BigDecimal d2)

Description

mul

License

Apache License

Declaration

public static BigDecimal mul(BigDecimal d1, BigDecimal d2) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {

    public static double mul(double d1, double d2) {
        BigDecimal b1 = new BigDecimal(Double.toString(d1));
        BigDecimal b2 = new BigDecimal(Double.toString(d2));
        return b1.multiply(b2).doubleValue();
    }/*from  ww  w.j a v  a  2s  . c  o  m*/

    public static BigDecimal mul(BigDecimal d1, BigDecimal d2) {
        return d1.multiply(d2);
    }
}

Related

  1. mul(BigDecimal b1, BigDecimal b2)
  2. mul(BigDecimal v1, BigDecimal v2)
  3. mul(BigDecimal v1, BigDecimal v2)
  4. multiple(BigDecimal dividend, int divisor)
  5. multiply(BigDecimal a, BigDecimal b)