The java.lang.StrictMath.cbrt() is an inbuilt method in Java which is used to return the cube root of a given double value. The method shows three special results:
- The result is a zero with the same sign as the argument when the given argument is zero.
- The result is infinity with the same sign of argument when the argument is infinite.
- The result is NaN when the given argument is NaN.
public static double cbrt(double num)
Parameters: This method accepts one parameter num which is of double type whose cube root is required to be found.
Return Value : The method returns the cube root of num.
Below programs illustrate the java.lang.StrictMath.cbrt() method:
Cube root of 8.05 = 2.0041580161269152 Cube root of 27.0 = 3.0 Cube root of 0.0 = 0.0
Cube root of -8.05 = -2.0041580161269152 Cube root of 128.0 = 5.039684199579493 Cube root of 0.0 = 0.0
- Java cbrt() method with Examples
- StrictMath exp() Method in Java
- StrictMath log() Method In Java
- StrictMath sin() Method in Java
- StrictMath pow() Method in Java
- StrictMath tan() Method in Java
- StrictMath min() Method in Java with Examples
- StrictMath acos() Method in Java
- StrictMath rint() Method in Java
- StrictMath round() method in Java
- StrictMath nextDown() Method in Java
- StrictMath max() Method in Java With Examples
- StrictMath nextAfter() Method in Java
- StrictMath toDegrees() Method in Java
- StrictMath cosh() Method in Java
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.