w3resource

PostgreSQL CBRT() function

CBRT() function

The PostgreSQL cbrt() function is used to return the cube root of a given number.

Uses of CBRT() Function
  • Mathematical Calculations: Determine the cube root of numeric values.

  • Data Analysis: Useful in scientific and statistical computations where cube roots are required.

  • Engineering Applications: Applied in fields that require volume-related calculations.

  • Financial Modeling: Used in complex financial models that involve power-based transformations.

Syntax:

cbrt()

PostgreSQL Version: 9.3

Pictorial presentation of PostgreSQL CBRT() function

pictorial presentation of PostgreSQL CBRT() function

Example: PostgreSQL CBRT() function

Code:

SELECT CBRT(343) AS "Cube Root";

Sample Output:

 Cube Root
-----------
         7
(1 row)

Example: PostgreSQL CBRT() function using negative value

Code:

SELECT CBRT(-343) AS "Cube Root";

Sample Output:

 Cube Root
-----------
        -7
(1 row)

Previous: ATAN2 function
Next: CEIL function



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/PostgreSQL/cbrt-function.php