Examples of shiftLeft()


Examples of java.math.BigInteger.shiftLeft()

                mhi = BigInteger.valueOf(1<<Log2P);
            }

            b = b.shiftLeft(e[0] + s2);
            BigInteger s = BigInteger.valueOf(1);
            s = s.shiftLeft(s2);
            /* At this point we have the following:
             *   s = 2^s2;
             *   1 > df = b/2^s2 > 0;
             *   (d - prevDouble(d))/2 = mlo/2^s2;
             *   (nextDouble(d) - d)/2 = mhi/2^s2. */
 
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

            m2 += i;
            s2 += i;
        }
        /* Now S*2^s2 has exactly four leading zero bits in its most significant word. */
        if (b2 > 0)
            b = b.shiftLeft(b2);
        if (s2 > 0)
            S = S.shiftLeft(s2);
        /* Now we have d/10^k = b/S and
           (mhi * 2^m2) / S = maximum acceptable error, divided by 10^k. */
        if (k_check) {
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

                            && ((word1(d) & 1) == 0)
                    )) {
                    if (j1 > 0) {
                        /* Either dig or dig+1 would work here as the least significant decimal digit.
                           Use whichever would produce a decimal value closer to d. */
                        b = b.shiftLeft(1);
                        j1 = b.compareTo(S);
                        if (((j1 > 0) || (j1 == 0 && (((dig & 1) == 1) || biasUp)))
                            && (dig++ == '9')) {
                                buf.append('9');
                                if (roundOff(buf)) {
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

                b = b.multiply(BigInteger.valueOf(10));
            }

        /* Round off last digit */

        b = b.shiftLeft(1);
        j = b.compareTo(S);
        if ((j > 0) || (j == 0 && (((dig & 1) == 1) || biasUp))) {
//        roundoff:
//            while(*--s == '9')
//                if (s == buf) {
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

  public BigInteger toBigIntegerAccurate() {
    BigInteger b = BigInteger.ZERO;
    for (BigInteger degree : degrees) {
      BigInteger term = BigInteger.ONE;
      for (BigInteger i = BigInteger.ONE; i.compareTo(degree) <= 0; i = i.add(BigInteger.ONE)) {
        term = term.shiftLeft(1);
      }
      b.add(term);
    }
    return b;
  }
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

        boolean initial = true;

        // simpleFixup

        if (f == 1L << (p-1)) {
            Mplus = Mplus.shiftLeft(1);
            R = R.shiftLeft(1);
            S = S.shiftLeft(1);
        }
        int k = 0;
        while (R.compareTo(S.add(NINE).divide(TEN)) < 0) {  // (S+9)/10 == ceiling(S/10)
View Full Code Here

Examples of org.eclipse.ui.internal.texteditor.quickdiff.compare.rangedifferencer.RangeDifference.shiftLeft()


    // shift the partial diffs to the absolute document positions
    for (Iterator it= diffs.iterator(); it.hasNext();) {
      RangeDifference d= (RangeDifference) it.next();
      d.shiftLeft(leftStartLine);
      d.shiftRight(rightStartLine);
    }

    // undo optimization shifting
    if (shiftBefore > 0) {
View Full Code Here

Examples of org.eclipse.ui.internal.texteditor.quickdiff.compare.rangedifferencer.RangeDifference.shiftLeft()

            changed= true;
          else
            break;
        }
//        fChanged.add(current); // not needed since positional shifting is not handled by an annotation model
        current.shiftLeft(leftShift);
        current.shiftRight(rightShift);
      }
     
      fUpdateNeeded= changed;
    }
View Full Code Here

Examples of org.rabinfingerprint.polynomial.Polynomial.shiftLeft()

  }

  private void precomputePopTable() {
    for (int i = 0; i < 256; i++) {
      Polynomial f = Polynomial.createFromLong(i);
      f = f.shiftLeft(BigInteger.valueOf(bytesPerWindow * 8));
      f = f.mod(poly);
      popTable[i] = f.toBigInteger().longValue();
    }
  }

View Full Code Here

Examples of org.rabinfingerprint.polynomial.Polynomial.shiftLeft()

   * If we have passed overflowed our window, we pop a byte
   */
  @Override
  public synchronized void pushByte(byte b) {
    Polynomial f = fingerprint;
    f = f.shiftLeft(byteShift);
    f = f.or(Polynomial.createFromLong(b & 0xFFL));
    f = f.mod(poly);

    fingerprint = f;

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.