Overview
Mathematical, trigonometric, and hyperbolic functions in Redpanda SQL are designed to perform mathematical calculations and manipulate numeric values.
Mathematical functions
| Function | Description |
|---|---|
This function returns the absolute value of an argument, regardless of whether it is positive or negative |
|
This function returns the cube root of a given number |
|
This function rounds up to the nearest positive or negative integer value greater than or equal to the argument |
|
This function returns the exponential value of a number specified in the argument |
|
This function returns a number rounded down that is less than or equal to the specified argument |
|
This function extracts the greatest or largest value from a set of values. |
|
This function returns the least or smallest value in a list of values |
|
This function returns the natural logarithm (base e) of its argument |
|
This function returns the base-10 logarithm or logarithm of the specified base of a given number |
|
This function returns the value of a number raised to the power of another number specified in the arguments |
|
This function returns a random number between 0 (inclusive) and 1 (exclusive) |
|
This function rounds numbers to the nearest integer or to a specified number of decimal places |
|
This function returns -1 for negative arguments, 1 for positive arguments or 0 if the argument is 0 |
|
This function returns the square root of its argument |
|
Formats a number into a string using a given format |
Trigonometric functions
These trigonometric functions take arguments and return values of type double precision and real.
| Function | Description | Syntax | Example |
|---|---|---|---|
|
Calculates the inverse cosine of a given argument, where the output is expressed in radians. |
|
|
|
Calculates the inverse cosine of a given argument, where the output is expressed in degrees. |
|
|
|
Calculates the inverse sine of a given argument, where the output is expressed in radians. |
|
|
|
Calculates the inverse sine of a given argument, where the output is expressed in degrees. |
|
|
|
Calculates the inverse tangent of a given argument, where the output is expressed in radians. |
|
|
|
Calculates the inverse tangent of a given argument, where the output is expressed in degrees. |
|
|
|
Calculates the inverse tangent of y/x, where the output is expressed in radians. |
|
|
|
Calculates the inverse tangent of y/x, where the output is expressed in degrees. |
|
|
|
Calculates the cosine of a given argument, where the argument is in radians. |
|
|
|
Calculates the cosine of a given argument, where the argument is in degrees. |
|
|
|
Calculates the cotangent of a given argument, where the argument is in radians. |
|
|
|
Calculates the cotangent of a given argument, where the argument is in degrees. |
|
|
Calculates the sine of a given argument, where the argument is in radians. |
|
|
|
|
Calculates the sine of a given argument, where the argument is in degrees. |
|
|
|
Calculates the tangent of a given argument, where the argument is in radians. |
|
|
|
Calculates the tangent of a given argument, where the argument is in degrees. |
|
|