Examples of pow()


Examples of java.math.BigInteger.pow()

                        */
                        for(int primindx=0 ; primindx < pows.size() ; primindx++)
                        {
                                int ex= pows.elementAt(primindx).intValue() ;
                                final BigInteger p = primes.at(primindx) ;
                                n = n.multiply( p.pow(ex) ) ;
                                primeexp.add(new Integer(p.intValue()) ) ;
                                primeexp.add(new Integer(ex) ) ;
                        }
                }
                else
View Full Code Here

Examples of java.math.BigInteger.pow()

                {
                        pows.primeexp.add( primeexp.elementAt(i)) ;
                        pows.primeexp.add( primeexp.elementAt(i+1)) ;
                        BigInteger p = new BigInteger( primeexp.elementAt(i).toString() ) ;
                        int ex = primeexp.elementAt(i+1).intValue() ;
                        pows.n = pows.n.multiply( p.pow(ex) ) ;
                }
                return pows ;
        } /* Ifactor.dropPrime */

        /** Test whether this is a square of an integer (perfect square).
View Full Code Here

Examples of java.math.BigInteger.pow()

                return tpow.integer[i];
            }
        }

        BigInteger bi=_getBigInt_(i,cache);
        tpow.integer[i]=bi.pow(npow);
        tpow.power[i]=npow;
        return tpow.integer[i];
    }
   
    /*
 
View Full Code Here

Examples of java.math.BigInteger.pow()

    public Element mul(BigInteger num) {
      Element now = this;
      int count = 0;
      BigInteger two = new BigInteger("2");
      while (two.pow(count).compareTo(num) <= 0) {
        count++;
      }
      Element[] pows = new Element[count];
      pows[0] = now;
      for (int i = 1; i < pows.length; i++) {
View Full Code Here

Examples of java.math.BigInteger.pow()

      return BigInteger.valueOf(LongMath.sqrt(x.longValue(), mode));
    }
    BigInteger sqrtFloor = sqrtFloor(x);
    switch (mode) {
      case UNNECESSARY:
        checkRoundingUnnecessary(sqrtFloor.pow(2).equals(x)); // fall through
      case FLOOR:
      case DOWN:
        return sqrtFloor;
      case CEILING:
      case UP:
View Full Code Here

Examples of java.math.BigInteger.pow()

      case FLOOR:
      case DOWN:
        return sqrtFloor;
      case CEILING:
      case UP:
        return sqrtFloor.pow(2).equals(x) ? sqrtFloor : sqrtFloor.add(BigInteger.ONE);
      case HALF_DOWN:
      case HALF_UP:
      case HALF_EVEN:
        BigInteger halfSquare = sqrtFloor.pow(2).add(sqrtFloor);
        /*
 
View Full Code Here

Examples of java.math.BigInteger.pow()

      return BigInteger.valueOf(LongMath.sqrt(x.longValue(), mode));
    }
    BigInteger sqrtFloor = sqrtFloor(x);
    switch (mode) {
      case UNNECESSARY:
        checkRoundingUnnecessary(sqrtFloor.pow(2).equals(x)); // fall through
      case FLOOR:
      case DOWN:
        return sqrtFloor;
      case CEILING:
      case UP:
View Full Code Here

Examples of java.math.BigInteger.pow()

      case FLOOR:
      case DOWN:
        return sqrtFloor;
      case CEILING:
      case UP:
        return sqrtFloor.pow(2).equals(x) ? sqrtFloor : sqrtFloor.add(BigInteger.ONE);
      case HALF_DOWN:
      case HALF_UP:
      case HALF_EVEN:
        BigInteger halfSquare = sqrtFloor.pow(2).add(sqrtFloor);
        /*
 
View Full Code Here

Examples of java.math.BigInteger.pow()

      return BigInteger.valueOf(LongMath.sqrt(x.longValue(), mode));
    }
    BigInteger sqrtFloor = sqrtFloor(x);
    switch (mode) {
      case UNNECESSARY:
        checkRoundingUnnecessary(sqrtFloor.pow(2).equals(x)); // fall through
      case FLOOR:
      case DOWN:
        return sqrtFloor;
      case CEILING:
      case UP:
View Full Code Here

Examples of java.math.BigInteger.pow()

      case FLOOR:
      case DOWN:
        return sqrtFloor;
      case CEILING:
      case UP:
        return sqrtFloor.pow(2).equals(x) ? sqrtFloor : sqrtFloor.add(BigInteger.ONE);
      case HALF_DOWN:
      case HALF_UP:
      case HALF_EVEN:
        BigInteger halfSquare = sqrtFloor.pow(2).add(sqrtFloor);
        /*
 
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.