comparison base/src/java/math/BigDecimal.d @ 112:9f4c18c268b2

Update to compile and execute with dmd 2.052.
author kntroh
date Wed, 16 Mar 2011 21:53:53 +0900
parents 48d4ee626868
children
comparison
equal deleted inserted replaced
111:b6e9904989ed 112:9f4c18c268b2
43 /* 43 /*
44 * Special case zero to supress nonterminating normalization 44 * Special case zero to supress nonterminating normalization
45 * and bogus scale calculation. 45 * and bogus scale calculation.
46 */ 46 */
47 if (significand == 0) { 47 if (significand == 0) {
48 intVal = BigInteger.ZERO; 48 intVal = cast(BigInteger) BigInteger.ZERO;
49 intCompact = 0; 49 intCompact = 0;
50 precision = 1; 50 precision = 1;
51 return; 51 return;
52 } 52 }
53 53
64 scale_ = -exponent; 64 scale_ = -exponent;
65 } else if (exponent > 0) { 65 } else if (exponent > 0) {
66 intVal = intVal.multiply(BigInteger.valueOf(2).pow(exponent)); 66 intVal = intVal.multiply(BigInteger.valueOf(2).pow(exponent));
67 } 67 }
68 if (intVal.bitLength() <= MAX_BIGINT_BITS) { 68 if (intVal.bitLength() <= MAX_BIGINT_BITS) {
69 intCompact = intVal.longValue(); 69 intCompact = cast(int)intVal.longValue();
70 } 70 }
71 } 71 }
72 this(String val){ 72 this(String val){
73 implMissing(__FILE__, __LINE__); 73 implMissing(__FILE__, __LINE__);
74 } 74 }