Returns the cube root of a numeric value.
Syntax
Parameters
| Parameter | Description | Supported input types |
|---|
<value> | The value whose cube root is calculated. | DOUBLE PRECISION (implicit cast from INTEGER, BIGINT, REAL, NUMERIC) |
Return Type
DOUBLE PRECISION
CBRT(NULL) returns NULL.
CBRT('NaN') returns NaN.
CBRT('Infinity') returns Infinity and CBRT('-Infinity') returns -Infinity.
- Unlike
SQRT, CBRT accepts negative inputs and returns a negative result.
Example
The following example returns the cube root of 27:
| cbrt double |
|---|
| 3.0000000000000004 |
Rows: 1Execution time: 2.05ms
The following example shows that CBRT accepts negative values:
Rows: 1Execution time: 2.33ms