Lines Matching refs:newScale
1956 int newScale = checkScale((long)scale * n);
1958 return new BigDecimal(intVal.pow(n), newScale);
2322 * @param newScale scale of the {@code BigDecimal} value to be returned.
2334 public BigDecimal setScale(int newScale, RoundingMode roundingMode) {
2335 return setScale(newScale, roundingMode.oldMode);
2358 * @param newScale scale of the {@code BigDecimal} value to be returned.
2378 public BigDecimal setScale(int newScale, int roundingMode) {
2383 if (newScale == oldScale) // easy case
2386 return BigDecimal.valueOf(0, newScale);
2389 if (newScale > oldScale) {
2390 int raise = checkScale((long)newScale - oldScale);
2395 return new BigDecimal(rb, rs, newScale,
2398 // newScale < oldScale -- drop some digits
2400 int drop = checkScale((long)oldScale - newScale);
2404 newScale, roundingMode, newScale);
2408 newScale, roundingMode, newScale);
2438 * @param newScale scale of the {@code BigDecimal} value to be returned.
2448 public BigDecimal setScale(int newScale) {
2449 return setScale(newScale, ROUND_UNNECESSARY);
2471 int newScale = checkScale((long)scale + n);
2472 BigDecimal num = new BigDecimal(intVal, intCompact, newScale, 0);
2493 int newScale = checkScale((long)scale - n);
2494 BigDecimal num = new BigDecimal(intVal, intCompact, newScale, 0);
3749 int newScale = d.checkScale((long)d.scale - drop);
3754 newScale, mode, newScale);
3758 newScale, mode, newScale);