Examples of shiftLeft()


Examples of java.math.BigInteger.shiftLeft()

                 */
                //System.out.print("A("+(2 * n + 1)+"):");
                BigDecimal c = zeta(2 * n + 1, mcloc,bern_cache,fact_cache).subtract(BigDecimal.ONE,mcloc);
                //System.out.print("B");
                BigInteger fourn = new BigInteger("" + (2 * n + 1));
                fourn = fourn.shiftLeft(2 * n);
                c = c.divide(new BigDecimal(fourn),mcloc);
                resul = resul.subtract(c,mcloc);
                //if (c.doubleValue() < 0.1 * eps)                      // removed by l.bruninx, 2012-03-26
                //    break;                                            // removed by l.bruninx, 2012-03-26
               
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

     * @throws Exception
     */
    public Node external_lshift(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(2);
        BigInteger r = number.get();
        r = r.shiftLeft((int) startAt.getSubNode(1, Node.TYPE_NUMBER).getNumber());
        return Node.createExternal(new External_Integer(r));
    }

    /**
     * surcharge de l'opérateur lshift!
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

    BigInteger b = new BigInteger(new byte[]{0x00,data[offset+1]});
    BigInteger c = new BigInteger(new byte[]{0x00,data[offset+2]});
    BigInteger d = new BigInteger(new byte[]{0x00,data[offset+3]});
    b = b.shiftLeft(8);
    c = c.shiftLeft(16);
    d = d.shiftLeft(24);

    return a.longValue() + b.longValue() + c.longValue() + d.longValue();
  }

View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

                if (k.testBit(j))
                {
                    Qh = Ql.multiply(Q).mod(p);
                    Uh = Uh.multiply(Vh).mod(p);
                    Vl = Vh.multiply(Vl).subtract(P.multiply(Ql)).mod(p);
                    Vh = Vh.multiply(Vh).subtract(Qh.shiftLeft(1)).mod(p);
                }
                else
                {
                    Qh = Ql;
                    Uh = Uh.multiply(Vl).subtract(Ql).mod(p);
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

        BigInteger big = BigInteger.ZERO;
        for (int i = 0; i < str.length(); i++)
        {
            int charpos = 16 * (sigchars - (i + 1));
            BigInteger charbig = BigInteger.valueOf(str.charAt(i) & 0xFFFF);
            big = big.or(charbig.shiftLeft(charpos));
        }
        return big;
    }

    /**
 
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

        BigInteger big = BigInteger.ZERO;
        for (int i = 0; i < str.length(); i++)
        {
            int charpos = 16 * (sigchars - (i + 1));
            BigInteger charbig = BigInteger.valueOf(str.charAt(i) & 0xFFFF);
            big = big.or(charbig.shiftLeft(charpos));
        }
        return big;
    }

    /**
 
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

        BigInteger big = BigInteger.ZERO;
        for (int i = 0; i < str.length(); i++)
        {
            int charpos = 16 * (sigchars - (i + 1));
            BigInteger charbig = BigInteger.valueOf(str.charAt(i) & 0xFFFF);
            big = big.or(charbig.shiftLeft(charpos));
        }
        return big;
    }

    /**
 
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

        BigInteger big = BigInteger.ZERO;
        for (int i = 0; i < str.length(); i++)
        {
            int charpos = 16 * (sigchars - (i + 1));
            BigInteger charbig = BigInteger.valueOf(str.charAt(i) & 0xFFFF);
            big = big.or(charbig.shiftLeft(charpos));
        }
        return big;
    }

    /**
 
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

        BigInteger big = BigInteger.ZERO;
        for (int i = 0; i < str.length(); i++)
        {
            int charpos = 16 * (sigchars - (i + 1));
            BigInteger charbig = BigInteger.valueOf(str.charAt(i) & 0xFFFF);
            big = big.or(charbig.shiftLeft(charpos));
        }
        return big;
    }

    /**
 
View Full Code Here

Examples of java.math.BigInteger.shiftLeft()

                mantissa = -mantissa;
            }
            exp -= 1075;
            BigInteger x = BigInteger.valueOf(mantissa);
            if (exp > 0) {
                x = x.shiftLeft(exp);
            } else if (exp < 0) {
                x = x.shiftRight(-exp);
            }
            intDigits = x.toString(base);
        }
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.