Does the Math.pow of java not support 3 parameters?

 public Boolean rabin_miller(double num) {
        int s = num.subtract(BigInteger.ONE);
        int t = 0;
        BigInteger[] bis = s.divideAndRemainder(two);
        while(bis[1].compareTo(BigInteger.ZERO)== 0){
            s = (double) (s.divide(two));
            t += 1;
        }
        for (int i = 0; i < 5; iPP) {
            int max = num.subtract(BigInteger.ONE);
            int min = 2;
            Random random = new Random();
            double a = (double) random.nextInt(max)%(max-min+1) + min;
            int v = (int) Math.pow(a, s, num);
            if(v != 1){
                i = 0;
                while(v != (num.subtract(one))) {
                    if(i == t - 1)
                        return false;
                    else{
                        i = i + 1;
                        v = (v ** 2) % num;
                    }
                }
            }
            return true;
        }
    }

clipboard.png

May.11,2022

  1. not supported!
  2. what do you want the third parameter to do?
  3. this api can be found by looking up the document

encapsulate it for yourself.


java api definition for so long there must be no problem with
x to the y power, so why are there three parameters
Math.pow (Math.pow (x charge y), z)

Menu