简体   繁体   English

如何从 Java 8 中的立方根函数中获取所有三个根

[英]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.

相关问题 如何使用Java在xml中获取子级的所有根 - how to get all roots of a child in xml using java 我想在Java中实现Matlab的根函数(多项式的根) - I want to implement the roots function of matlab (root of polynomial) in java (JAVA) 打印一个表格,显示从 1 到 10 的数字,打印数字、它的立方根、平方根、平方根、平方和立方 - (JAVA) Print a table displaying numbers from 1-10 that print the number, its cube root, square root, square root, square, and cube Apache Commons Math PolynomialSolver:如何获得所有根? - Apache commons math PolynomialSolver: how to get all roots? 使用Java Math平方根方法计算1到1,000的平方根。 然后只输出整数 - Use the Java Math square root method to calculate square roots from 1 to 1,000. Then output the whole numbers only 如何从 xml 获取一个节点,其中包含根元素中的所有 inscope 命名空间 - How to get a node from xml with all inscope namespaces in root element 如何在特殊图中获取从叶子到根的所有路径 - How to get all paths from leaf to the root in a special graph 如何从java中的TreeMap获取根节点? - How do I get the root node from a TreeMap in java? 如何从POJO获取Java EE 6应用程序中的上下文根目录? - How to get the context root directory in Java EE 6 application from a POJO? 如何从 java 中的源根目录获取文件的路径? - How to get the path of the file from source root in java?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM