All math and trigonometric functions require their input (where applicable) to be numeric.
ABS(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: numeric
Description: Returns the {wikipedia}/Absolute_value[absolute value] of numeric_exp
. The return type is the same as the input type.
include-tagged::{sql-specs}/docs/docs.csv-spec[abs]
CBRT(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Cube_root[cube root] of numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineCbrtWithNegativeValue]
CEIL(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: integer or long numeric value
Description: Returns the smallest integer greater than or equal to numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineCeiling]
E()
Input: none
Output: 2.718281828459045
Description: Returns {wikipedia}/E_%28mathematical_constant%29[Euler’s number].
include-tagged::{sql-specs}/docs/docs.csv-spec[mathEulersNumber]
EXP(numeric_exp) (1)
Input:
-
float numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns {wikipedia}/Exponential_function[Euler’s number at the power] of numeric_exp
enumeric_exp.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathExpInline]
EXPM1(numeric_exp) (1)
Input:
-
float numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns Euler’s number at the power of numeric_exp
minus 1 (enumeric_exp - 1).
include-tagged::{sql-specs}/docs/docs.csv-spec[mathExpm1Inline]
FLOOR(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: integer or long numeric value
Description: Returns the largest integer less than or equal to numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineFloor]
LOG(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Natural_logarithm[natural logarithm] of numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineLog]
LOG10(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Common_logarithm[base 10 logarithm] of numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineLog10]
PI()
Input: none
Output: 3.141592653589793
Description: Returns {wikipedia}/Pi[PI number].
include-tagged::{sql-specs}/docs/docs.csv-spec[mathPINumber]
POWER(
numeric_exp, (1)
integer_exp) (2)
Input:
-
numeric expression. If
null
, the function returnsnull
. -
integer expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the value of numeric_exp
to the power of integer_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlinePowerPositive]
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlinePowerNegative]
RANDOM(seed) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns a random double using the given seed.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathRandom]
ROUND(
numeric_exp (1)
[, integer_exp]) (2)
Input:
-
numeric expression. If
null
, the function returnsnull
. -
integer expression; optional. If
null
, the function returnsnull
.
Output: numeric
Description: Returns numeric_exp
rounded to integer_exp
places right of the decimal point. If integer_exp
is negative,
numeric_exp
is rounded to |integer_exp
| places to the left of the decimal point. If integer_exp
is omitted,
the function will perform as if integer_exp
would be 0. The returned numeric data type is the same as the data type
of numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathRoundWithPositiveParameter]
include-tagged::{sql-specs}/docs/docs.csv-spec[mathRoundWithNegativeParameter]
SIGN(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: [-1, 0, 1]
Description: Returns an indicator of the sign of numeric_exp
. If numeric_exp
is less than zero, –1 is returned. If numeric_exp
equals zero, 0 is returned. If numeric_exp
is greater than zero, 1 is returned.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineSign]
SQRT(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns {wikipedia}/Square_root[square root] of numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineSqrt]
TRUNCATE(
numeric_exp (1)
[, integer_exp]) (2)
Input:
-
numeric expression. If
null
, the function returnsnull
. -
integer expression; optional. If
null
, the function returnsnull
.
Output: numeric
Description: Returns numeric_exp
truncated to integer_exp
places right of the decimal point. If integer_exp
is negative,
numeric_exp
is truncated to |integer_exp
| places to the left of the decimal point. If integer_exp
is omitted,
the function will perform as if integer_exp
would be 0. The returned numeric data type is the same as the data type
of numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathTruncateWithPositiveParameter]
include-tagged::{sql-specs}/docs/docs.csv-spec[mathTruncateWithNegativeParameter]
ACOS(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Inverse_trigonometric_functions[arccosine] of numeric_exp
as an angle, expressed in radians.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineAcos]
ASIN(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Inverse_trigonometric_functions[arcsine] of numeric_exp
as an angle, expressed in radians.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineAsin]
ATAN(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Inverse_trigonometric_functions[arctangent] of numeric_exp
as an angle, expressed in radians.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineAtan]
ATAN2(
ordinate, (1)
abscisa) (2)
Input:
-
numeric expression. If
null
, the function returnsnull
. -
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Atan2[arctangent of the ordinate
and abscisa
coordinates] specified as an angle, expressed in radians.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineAtan2]
COS(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Trigonometric_functions#cosine[cosine] of numeric_exp
, where numeric_exp
is an angle expressed in radians.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineCosine]
COSH(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Hyperbolic_function[hyperbolic cosine] of numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineCosh]
COT(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Trigonometric_functions#Cosecant,_secant,_and_cotangent[cotangent] of numeric_exp
, where numeric_exp
is an angle expressed in radians.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineCotangent]
DEGREES(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Convert from {wikipedia}/Radian[radians] to {wikipedia}/Degree_(angle)[degrees].
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineDegrees]
RADIANS(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Convert from {wikipedia}/Degree_(angle)[degrees] to {wikipedia}/Radian[radians].
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineRadians]
SIN(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Trigonometric_functions#sine[sine] of numeric_exp
, where numeric_exp
is an angle expressed in radians.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineSine]
SINH(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Hyperbolic_function[hyperbolic sine] of numeric_exp
.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineSinh]
TAN(numeric_exp) (1)
Input:
-
numeric expression. If
null
, the function returnsnull
.
Output: double numeric value
Description: Returns the {wikipedia}/Trigonometric_functions#tangent[tangent] of numeric_exp
, where numeric_exp
is an angle expressed in radians.
include-tagged::{sql-specs}/docs/docs.csv-spec[mathInlineTanget]