Skip to content

Multiplication

Abraham Hernandez edited this page Jul 26, 2018 · 1 revision

Multiplication

Multiplication between two BigDecimal numbers

public static BigDecimal multiply(BigDecimal x, BigDecimal y);

Parameters:

  • x - Big decimal number
  • y - Big decimal number

Returns:

Multiplication of x times y

Example

import com.abranhe.bigdecimal.Operations;
import java.math.BigDecimal;

public static void main(String[] args){

        BigDecimal x = new BigDecimal("124567890.0987654321");
        BigDecimal y = new BigDecimal("987654321.123456789");

        System.out.println(Operations.multiply(x, y));
        //=> 123030014929277547.5030955772112635269
}
Clone this wiki locally