Code example for BigDecimal

Methods: divideintValue

0
		case '*': 
			stack.push(new BigDecimal(valOne).multiply(new BigDecimal(valTwo))
					.toPlainString());
			break; 
		case '/': 
			BigDecimal d2 = new BigDecimal(valTwo);
			if (d2.intValue() == 0) {
				stack.push("0.0");
			} else { 
				stack.push(new BigDecimal(valOne).divide(d2, 2,
						BigDecimal.ROUND_HALF_UP).toPlainString());
			} 
			break; 
		default: 
			break; 
		} 
		setDisplay(stack.peek());
		if (isInEquals) {
			stack.push(valTwo);
		} 
Stop searching for code, let great code find you!  Add Codota to your java IDE