• Home
  • Raw
  • Download

Lines Matching refs:BigInteger

108 import java.math.BigInteger;
196 static final BigInteger big0 = BigInteger.ZERO;
197 static final BigInteger big1 = BigInteger.ONE;
198 static final BigInteger bigm1 = BigInteger.valueOf(-1);
199 static final BigInteger big2 = BigInteger.valueOf(2);
200 static final BigInteger big3 = BigInteger.valueOf(3);
201 static final BigInteger big6 = BigInteger.valueOf(6);
202 static final BigInteger big8 = BigInteger.valueOf(8);
203 static final BigInteger big10 = BigInteger.TEN;
204 static final BigInteger big750 = BigInteger.valueOf(750);
205 static final BigInteger bigm750 = BigInteger.valueOf(-750);
228 protected abstract BigInteger approximate(int precision); in approximate()
232 transient BigInteger max_appr;
263 public static CR valueOf(BigInteger n) { in valueOf()
272 return valueOf(BigInteger.valueOf(n)); in valueOf()
280 return valueOf(BigInteger.valueOf(n)); in valueOf()
319 static BigInteger shift(BigInteger k, int n) { in shift()
326 static BigInteger scale(BigInteger k, int n) { in scale()
330 BigInteger adj_k = shift(k, n+1).add(big1); in scale()
345 public synchronized BigInteger get_appr(int precision) { in get_appr()
350 BigInteger result = approximate(precision); in get_appr()
481 BigInteger this_appr = get_appr(needed_prec); in compareTo()
482 BigInteger x_appr = x.get_appr(needed_prec); in compareTo()
515 BigInteger this_appr = get_appr(needed_prec); in signum()
558 BigInteger scaled_result = new BigInteger(whole + fraction, radix); in valueOf()
559 BigInteger divisor = BigInteger.valueOf(radix).pow(fraction.length()); in valueOf()
575 BigInteger scale_factor = BigInteger.valueOf(radix).pow(n); in toString()
578 BigInteger scaled_int = scaled_CR.get_appr(0); in toString()
636 BigInteger big_radix = BigInteger.valueOf(radix); in toStringFloatRep()
656 BigInteger scaled_int = scaled_res.get_appr(0); in toStringFloatRep()
679 public BigInteger BigIntegerValue() { in BigIntegerValue()
854 BigInteger rough_appr = get_appr(low_prec); in exp()
878 BigInteger halfpi_multiples = divide(PI).get_appr(-1); in cos()
879 BigInteger abs_halfpi_multiples = halfpi_multiples.abs(); in cos()
882 BigInteger pi_multiples = scale(halfpi_multiples, -1); in cos()
909 BigInteger rough_appr = get_appr(-10); in asin()
927 static final BigInteger low_ln_limit = big8; /* sixteenths, i.e. 1/2 */
928 static final BigInteger high_ln_limit =
929 BigInteger.valueOf(16 + 8 /* 1.5 */);
930 static final BigInteger scaled_4 =
931 BigInteger.valueOf(4*16);
938 BigInteger rough_appr = get_appr(low_prec); /* In sixteenths */ in ln()
981 public synchronized BigInteger get_appr(int precision) { in get_appr()
988 BigInteger result = approximate(eval_prec); in get_appr()
1000 BigInteger value;
1001 int_CR(BigInteger n) { in int_CR()
1004 protected BigInteger approximate(int p) { in approximate()
1017 protected BigInteger approximate(int p) { in approximate()
1034 protected BigInteger approximate(int p) { in approximate()
1050 protected BigInteger approximate(int p) { in approximate()
1061 protected BigInteger approximate(int p) { in approximate()
1081 protected BigInteger approximate(int p) { in approximate()
1084 BigInteger op1_appr = op1.get_appr(p-1); in approximate()
1085 BigInteger op2_appr = op2.get_appr(p-1); in approximate()
1086 BigInteger diff = op1_appr.subtract(op2_appr).abs(); in approximate()
1111 protected BigInteger approximate(int p) { in approximate()
1139 BigInteger appr2 = op2.get_appr(prec2); in approximate()
1143 BigInteger appr1 = op1.get_appr(prec1); in approximate()
1154 protected BigInteger approximate(int p) { in approximate()
1174 BigInteger dividend = big1.shiftLeft(log_scale_factor); in approximate()
1175 BigInteger scaled_divisor = op.get_appr(prec_needed); in approximate()
1176 BigInteger abs_scaled_divisor = scaled_divisor.abs(); in approximate()
1177 BigInteger adj_dividend = dividend.add( in approximate()
1180 BigInteger result = adj_dividend.divide(abs_scaled_divisor); in approximate()
1198 protected BigInteger approximate(int p) { in approximate()
1209 BigInteger op_appr = op.get_appr(op_prec); in approximate()
1215 BigInteger scaled_1 = big1.shiftLeft(-calc_precision); in approximate()
1216 BigInteger current_term = scaled_1; in approximate()
1217 BigInteger current_sum = scaled_1; in approximate()
1219 BigInteger max_trunc_error = in approximate()
1226 current_term = current_term.divide(BigInteger.valueOf(n)); in approximate()
1240 protected BigInteger approximate(int p) { in approximate()
1251 BigInteger op_appr = op.get_appr(op_prec); in approximate()
1257 BigInteger current_term; in approximate()
1259 BigInteger max_trunc_error = in approximate()
1263 BigInteger current_sum = current_term; in approximate()
1270 BigInteger divisor = BigInteger.valueOf(-n) in approximate()
1271 .multiply(BigInteger.valueOf(n-1)); in approximate()
1285 protected BigInteger approximate(int p) { in approximate()
1300 BigInteger scaled_1 = big1.shiftLeft(-calc_precision); in approximate()
1301 BigInteger big_op = BigInteger.valueOf(op); in approximate()
1302 BigInteger big_op_squared = BigInteger.valueOf(op*op); in approximate()
1303 BigInteger op_inverse = scaled_1.divide(big_op); in approximate()
1304 BigInteger current_power = op_inverse; in approximate()
1305 BigInteger current_term = op_inverse; in approximate()
1306 BigInteger current_sum = op_inverse; in approximate()
1309 BigInteger max_trunc_error = in approximate()
1317 current_power.divide(BigInteger.valueOf(current_sign*n)); in approximate()
1336 protected BigInteger approximate(int p) { in approximate()
1346 BigInteger op_appr = op.get_appr(op_prec); in approximate()
1348 BigInteger scaled_1 = big1.shiftLeft(-calc_precision); in approximate()
1349 BigInteger x_nth = scale(op_appr, op_prec - calc_precision); in approximate()
1350 BigInteger current_term = x_nth; // x**n in approximate()
1351 BigInteger current_sum = current_term; in approximate()
1354 BigInteger max_trunc_error = in approximate()
1361 current_term = x_nth.divide(BigInteger.valueOf(n * current_sign)); in approximate()
1376 protected BigInteger approximate(int p) { in approximate()
1400 BigInteger op_appr = op.get_appr(op_prec); in approximate()
1412 BigInteger max_last_term = in approximate()
1415 BigInteger current_term = op_appr.shiftLeft(op_prec - calc_precision); in approximate()
1416 BigInteger current_sum = current_term; in approximate()
1417 BigInteger current_factor = current_term; in approximate()
1431 current_factor = current_factor.multiply(BigInteger.valueOf(exp - 2)); in approximate()
1436 BigInteger divisor = BigInteger.valueOf(exp - 1); in approximate()
1443 current_term = current_factor.divide(BigInteger.valueOf(exp)); in approximate()
1460 protected BigInteger approximate(int p) { in approximate()
1471 BigInteger last_appr = get_appr(appr_prec); in approximate()
1473 BigInteger op_appr = op.get_appr(prod_prec); in approximate()
1477 BigInteger prod_prec_scaled_numerator = in approximate()
1479 BigInteger scaled_numerator = in approximate()
1481 BigInteger shifted_result = scaled_numerator.divide(last_appr); in approximate()
1488 BigInteger scaled_bi_appr = op.get_appr(op_prec) in approximate()
1494 BigInteger scaled_sqrt = BigInteger.valueOf((long)scaled_fp_sqrt); in approximate()