[英]How to get all three roots from a cube root function in Java 8
I have to do (-5.428271) 1/3 and want the complex-number "0.8787335 + 1.522011i" as well as the other 2 results.我必须做 (-5.428271) 1/3并且想要复数“0.8787335 + 1.522011i”以及其他 2 个结果。
Is there a method to do that?有没有办法做到这一点?
If there isn't, how can I create it?如果没有,我该如何创建它?
Apache commons math has an nthRoot method returning a list of complex values. Apache commons math有一个nthRoot方法返回一个复数值列表。 If you do not want the dependency, the javadoc has the formula.
如果你不想要依赖,javadoc 有公式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.