854855856857858859860861862863864
public BigInteger toInteger(){ BigDecimal num = number.get(); boolean negatif = num.signum()==-1; BigDecimal n=num.abs(); BigInteger n2 = BigDecimalMath.round(n).toBigInteger(); return negatif ? n2.negate(): n2; } /** * retourne un Node:Integer qui correspond à la partie tronquée (avec arrondi "round") du Decimal courant. *
24092410241124122413241424152416241724182419
is_neg = false; } byte[] ba = new byte[len]; System.arraycopy(buf, offset, ba, 0, len); BigInteger a = new BigInteger(ba); if (is_neg) a = a.negate(); return(a); } public static Object bytesToInteger(byte[] buf, int offset, int len) {
938939940941942943944945946947948
digits[i] = input.readSignedByte(); } BigInteger value = new BigInteger(digits); if (!positive) { value = value.negate(); } RubyNumeric result = bignorm(input.getRuntime(), value); input.registerLinkTarget(result); return result;
590591592593594595596597598599600
} else { z = new BigInteger(new String(result, 0, resultIndex), base); } if(!sign) { z = z.negate(); } if(badcheck) { if(_str.getBegin() + 1 < str && data[str-1] == '_') { invalidString("Integer");
20962097209820992100210121022103210421052106
24342435243624372438243924402441244224432444
259260261262263264265266267
index++; radix = 8; } BigInteger result = new BigInteger(value.substring(index), radix); return (negative ? result.negate() : result); } }
265266267268269270271272273
227228229230231232233234235
979899100101102103104105106107
BigInteger x3 = m.pow(2) .subtract(new BigInteger("2").multiply(this.x)) .mod(curve.p); BigInteger y3 = this.y.add(m.multiply(x3.subtract(this.x))) .mod(curve.p); return new Element(this.curve, x3, y3.negate()); } else if (this.x.equals(another.x) && !this.y.equals(another.y)) { return EllipticCurve.ZERO; } else { // m = (y2-y1)(x2-x1)^(-1) BigInteger m = another.y