cbrt method is a Math class method in Ruby which is used to calculate the cube root of the given value.
Parameter: Here, z is the value whose cube root is to be calculated.
Returns: This method returns the cube root of the given number.
Below programs illustrate the use of above-discussed method:
Cube root value of a : 3.0 cube root value of b : 1.7598088635408027
Cube root value of a : 4.272658681697917 cube root value of b : 8.999999999999998
- Private Classes in Ruby
- Ruby | Matrix cofactor() function
- Ruby Integer odd? function with example
- Ruby Integer div() function with example
- Ruby | Symbol to_s function
- Ruby | Set replace() function
- Ruby | Set reset() function
- Ruby For Beginners
- Ruby | Array Concatenation using (+) function
- Ruby | at() function
- Ruby Float to_r() method with example
- Ruby | Keywords
- Ruby | Exception Class and its Methods
- Ruby | String inspect Method
- Ruby | Numeric imaginary() function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.