Code example for BigInteger

Methods: negate

0
		hash = new BigDecimal(value, 2);
		hash2 = new BigDecimal("-1233456.0000");
		assertTrue("hashCode of 123459.08 and -1233456.0000 is not equal", hash
				.hashCode() != hash2.hashCode()
				&& !hash.equals(hash2));
		hash2 = new BigDecimal(value.negate(), 2);
		assertTrue("hashCode of 123459.08 and -123459.08 is not equal", hash
				.hashCode() != hash2.hashCode()
				&& !hash.equals(hash2));
	} 
 
	/** 
	 * @tests java.math.BigDecimal#intValue() 
	 */ 
	public void test_intValue() { 
		BigDecimal int1 = new BigDecimal(value, 3);
		assertTrue("the int value of 12345.908 is not 12345",
				int1.intValue() == 12345);
		int1 = new BigDecimal("1.99");
		assertTrue("the int value of 1.99 is not 1", int1.intValue() == 1);
		int1 = new BigDecimal("23423419083091823091283933");