public BigInteger round() { SimpleBigDecimal oneHalf = new SimpleBigDecimal(ECConstants.ONE, 1); return add(oneHalf.adjustScale(scale)).floor(); }
public SimpleBigDecimal multiply(SimpleBigDecimal b) { checkScale(b); return new SimpleBigDecimal(bigInt.multiply(b.bigInt), scale + scale); }
int scale = lambda0.getScale(); if (lambda1.getScale() != scale) BigInteger f0 = lambda0.round(); BigInteger f1 = lambda1.round(); SimpleBigDecimal eta0 = lambda0.subtract(f0); SimpleBigDecimal eta1 = lambda1.subtract(f1); SimpleBigDecimal eta = eta0.add(eta0); if (mu == 1) eta = eta.add(eta1); eta = eta.subtract(eta1); SimpleBigDecimal threeEta1 = eta1.add(eta1).add(eta1); SimpleBigDecimal fourEta1 = threeEta1.add(eta1); SimpleBigDecimal check1; SimpleBigDecimal check2; if (mu == 1) check1 = eta0.subtract(threeEta1); check2 = eta0.add(fourEta1); check1 = eta0.add(threeEta1); check2 = eta0.subtract(fourEta1); if (eta.compareTo(ECConstants.ONE) >= 0)
public SimpleBigDecimal multiply(BigInteger b) { return new SimpleBigDecimal(bigInt.multiply(b), scale); }
public int intValue() { return floor().intValue(); }
public int compareTo(SimpleBigDecimal val) { checkScale(val); return bigInt.compareTo(val.bigInt); }
int scale = lambda0.getScale(); if (lambda1.getScale() != scale) BigInteger f0 = lambda0.round(); BigInteger f1 = lambda1.round(); SimpleBigDecimal eta0 = lambda0.subtract(f0); SimpleBigDecimal eta1 = lambda1.subtract(f1); SimpleBigDecimal eta = eta0.add(eta0); if (mu == 1) eta = eta.add(eta1); eta = eta.subtract(eta1); SimpleBigDecimal threeEta1 = eta1.add(eta1).add(eta1); SimpleBigDecimal fourEta1 = threeEta1.add(eta1); SimpleBigDecimal check1; SimpleBigDecimal check2; if (mu == 1) check1 = eta0.subtract(threeEta1); check2 = eta0.add(fourEta1); check1 = eta0.add(threeEta1); check2 = eta0.subtract(fourEta1); if (eta.compareTo(ECConstants.ONE) >= 0)
public SimpleBigDecimal shiftLeft(int n) { return new SimpleBigDecimal(bigInt.shiftLeft(n), scale); }
public long longValue() { return floor().longValue(); } /* NON-J2ME compliant.
public int compareTo(SimpleBigDecimal val) { checkScale(val); return bigInt.compareTo(val.bigInt); }
public BigInteger round() { SimpleBigDecimal oneHalf = new SimpleBigDecimal(ECConstants.ONE, 1); return add(oneHalf.adjustScale(scale)).floor(); }
public SimpleBigDecimal multiply(SimpleBigDecimal b) { checkScale(b); return new SimpleBigDecimal(bigInt.multiply(b.bigInt), scale + scale); }
public SimpleBigDecimal divide(BigInteger b) { return new SimpleBigDecimal(bigInt.divide(b), scale); }
public long longValue() { return floor().longValue(); } /* NON-J2ME compliant.
public SimpleBigDecimal add(SimpleBigDecimal b) { checkScale(b); return new SimpleBigDecimal(bigInt.add(b.bigInt), scale); }
public SimpleBigDecimal negate() { return new SimpleBigDecimal(bigInt.negate(), scale); }