这个 JAVA朗,数学。(cbrt) 方法返回双精度值的立方根。 注:
null
- 立方根 一个 负值 是吗 消极的 关于 立方根 这个值的大小。
- 如果论点是正确的 楠 ,然后 后果 是 楠 .
- 如果论点是正确的 极大的 ,然后 后果 是一个 无穷 和 同样的标志 作为论据。
- 如果论点是正确的 零 ,然后 结果 是一个 零 和 同样的标志 作为论据。
语法:
public static double cbrt(double a) Parameter : a : an argument Return : This method returns the cube root of a.
例子: 表示工作 JAVA朗,数学。(cbrt) 方法
// Java program to demonstrate working // of java.lang.Math.cbrt() method import java.lang.Math; class Gfg { // driver code public static void main(String args[]) { double a = 125.0 ; double b = 1.0 / 0 ; double c = -( 1.0 / 0 ); double d = 0.0 ; double e = - 0.0 ; System.out.println(Math.cbrt(a)); // Input Positive Infinity // Output Positive Infinity System.out.println(Math.cbrt(b)); // Input Negative Infinity // Output Negative Infinity System.out.println(Math.cbrt(c)); // Input Positive Zero // Output Positive Zero System.out.println(Math.cbrt(d)); // Input Negative Zero // Output Negative Zero System.out.println(Math.cbrt(e)); } } |
输出:
5.0 Infinity -Infinity 0.0 -0.0
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END