/openjdk7/jdk/src/share/classes/java/math/ |
H A D | MathContext.java | 56 public final class MathContext implements Serializable { class in inherits:Serializable 71 * A {@code MathContext} object whose settings have the values 78 public static final MathContext UNLIMITED = 79 new MathContext(0, RoundingMode.HALF_UP); 82 * A {@code MathContext} object with a precision setting 87 public static final MathContext DECIMAL32 = 88 new MathContext(7, RoundingMode.HALF_EVEN); 91 * A {@code MathContext} object with a precision setting 96 public static final MathContext DECIMAL64 = 97 new MathContext(1 140 public MathContext(int setPrecision) { method in class:MathContext 155 public MathContext(int setPrecision, method in class:MathContext 182 public MathContext(String val) { method in class:MathContext [all...] |
H A D | BigDecimal.java | 54 * and rounding mode by supplying an appropriate {@link MathContext} 62 * <p>When a {@code MathContext} object is supplied with a precision 63 * setting of 0 (for example, {@link MathContext#UNLIMITED}), 65 * which take no {@code MathContext} object. (This is the only 68 * of a {@code MathContext} object with a precision setting of 0 is 100 * {@code MathContext}'s {@code precision} setting; this determines 167 * {@linkplain #pow(int, MathContext) specified algorithm} can 211 * @see MathContext 578 public BigDecimal(char[] in, int offset, int len, MathContext mc) { 624 public BigDecimal(char[] in, MathContext m [all...] |
/openjdk7/jdk/test/java/math/BigDecimal/ |
H A D | NegateTests.java | 27 * @summary Test for the rounding behavior of negate(MathContext) 35 static BigDecimal negateThenRound(BigDecimal bd, MathContext mc) { 40 static BigDecimal absThenRound(BigDecimal bd, MathContext mc) { 45 static int negateTest(BigDecimal[][] testCases, MathContext mc) { 89 new MathContext(1, RoundingMode.CEILING)); 97 new MathContext(1, RoundingMode.FLOOR));
|
H A D | RoundingTests.java | 36 MathContext mc = new MathContext(1);
|
H A D | RangeTests.java | 27 * @summary Some new tests for the add method and constructor with MathContext. 35 import java.math.MathContext; 161 private static int testRoundingFromBigInteger(BigInteger bi, int scale, MathContext mc) { 166 System.out.println("new BigDecimal(BigInteger,int,MathContext):" + 181 7, MathContext.DECIMAL64); 184 0, MathContext.DECIMAL64); 187 -7, MathContext.DECIMAL64); 190 7, MathContext.DECIMAL128); 193 177, MathContext.DECIMAL128); 196 177, MathContext [all...] |
H A D | ZeroScalingTests.java | 36 static MathContext longEnough = new MathContext(50, RoundingMode.UNNECESSARY); 49 static MathContext contexts[] = { 50 new MathContext(0, RoundingMode.UNNECESSARY), 51 new MathContext(100, RoundingMode.UNNECESSARY), 52 new MathContext(5, RoundingMode.UNNECESSARY), 53 new MathContext(4, RoundingMode.UNNECESSARY), 54 new MathContext(3, RoundingMode.UNNECESSARY), 55 new MathContext(2, RoundingMode.UNNECESSARY), 56 new MathContext( [all...] |
H A D | IntegralDivisionTests.java | 141 new MathContext(i, RoundingMode.DOWN)); 184 MathContext mc) { 202 MathContext mc) 218 System.err.println("MathContext = " + mc); 231 System.err.println("MathContext = " + mc); 254 MathContext mc = new MathContext(9,RoundingMode.DOWN); 267 new MathContext(precision, rm)); 287 new MathContext(precisions1[i], rm)); 307 new MathContext(precisions [all...] |
H A D | AddTests.java | 85 private static int addWithoutException(BigDecimal b1, BigDecimal b2, MathContext mc) { 87 mc = new MathContext(2, RoundingMode.DOWN); 239 MathContext mc = new MathContext(precision, rm); 273 MathContext mc = new MathContext(1,RoundingMode.DOWN);
|
H A D | DivideTests.java | 120 // MathContext object and pass it on to the divide(bd, 125 MathContext mc = new MathContext(dividend.precision() + 247 MathContext mc = new MathContext(3, RoundingMode.FLOOR);
|
H A D | DivideMcTests.java | 27 * @summary Some tests for the divide(..,MathContext) method. 34 import java.math.MathContext; 5760 BigDecimal res1 = v1.divide(v2, MathContext.DECIMAL64); 5774 BigDecimal res1 = v1.divide(v2, new MathContext(mpc, RoundingMode.HALF_EVEN)); 5775 BigDecimal res2 = v1.divide(v2, new MathContext(128, RoundingMode.HALF_EVEN)).round(new MathContext(mpc, RoundingMode.HALF_EVEN));
|
/openjdk7/jdk/make/java/math/ |
H A D | Makefile | 41 java/math/MathContext.java \
|
/openjdk7/jdk/src/share/classes/java/util/ |
H A D | Formatter.java | 41 import java.math.MathContext; 3539 MathContext mc = new MathContext(compPrec); 3593 new MathContext(compPrec));
|