Description
The cbrt function calculates the cube root of the given number number. It is useful when performing mathematical operations related to cube roots.
Syntax
cbrt(number)
Arguments
| Argument | Description |
|---|---|
number |
The number whose cube root is to be calculated. |
Return Type
The function returns the result of the calculation baseexponent as a number.
Examples
| Description | Example | Result |
|---|---|---|
| Cube root of a positive number |
cbrt(27)Result: 3 |
3 |
| Cube root of a negative number |
cbrt(-8)Result: -2 |
-2 |
| Cube root of a decimal number |
cbrt(0.125)Result: 0.5 |
0.5 |
Notes
- The function supports both positive and negative numbers. The cube root of a negative number also results in a negative value.
- If the number
numberis zero, the function returns0.
Comments
0 comments
Please sign in to leave a comment.