How can I find the Square Root of a Java BigInteger?

后端 未结 19 1161
[愿得一人]
[愿得一人] 2020-11-28 08:10

Is there a library that will find the square root of a BigInteger? I want it computed offline - only once, and not inside any loop. So even computationally expensive solutio

19条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 08:32

    A single line can do the job I think.

    Math.pow(bigInt.doubleValue(), (1/n));
    

提交回复
热议问题