Code example for BigDecimal

Methods: multiply

0
		promotionTester( promoter, big, bigl );
	} 
	 
	@Test public void decimalAndDouble() { 
		double pi = Math.PI;
		BigDecimal pidec = new BigDecimal( pi ).multiply( new BigDecimal( pi ) );
		 
		promoter.promote( pidec, pi);
		promotionTester( promoter, pidec.doubleValue(), pi );
		 
		promoter.promote( pi, pidec);
		promotionTester( promoter, pi, pidec.doubleValue() );
	} 
	 
	@Test public void bigIntAndFloat() { 
		BigInteger big = new BigInteger("9999999999999999999999999999999999999999999999");
		float fl = 9876543210.0123456789f;
		float bigf = big.floatValue();
		 
		promoter.promote( big, fl );
Stop searching for code, let great code find you!  Add Codota to your java IDE