|
@@ -8,68 +8,276 @@ to be numeric.
|
|
|
|
|
|
==== Generic
|
|
|
|
|
|
-* `ABS`
|
|
|
+[[sql-functions-math-abs]]
|
|
|
+===== `ABS`
|
|
|
|
|
|
-https://en.wikipedia.org/wiki/Absolute_value[Absolute value], returns \[same type as input]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+ABS(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: numeric
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Absolute_value[absolute value] of `numeric_exp`. The return type is the same as the input type.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[abs]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-cbrt]]
|
|
|
+===== `CBRT`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+CBRT(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Cube_root[cube root] of `numeric_exp`.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineCbrtWithNegativeValue]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-ceil]]
|
|
|
+===== `CEIL/CEILING`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+CEIL(numeric_exp<1>)
|
|
|
+CEILING(numeric_exp<2>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+<2> numeric expression
|
|
|
+
|
|
|
+*Output*: integer or long numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the smallest integer greater than or equal to `numeric_exp`.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineCeiling]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-e]]
|
|
|
+===== `E`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+E()
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*: _none_
|
|
|
+
|
|
|
+*Output*: `2.718281828459045`
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns https://en.wikipedia.org/wiki/E_%28mathematical_constant%29[Euler's number].
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathEulersNumber]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-exp]]
|
|
|
+===== `EXP`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+EXP(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> float numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns https://en.wikipedia.org/wiki/Exponential_function[Euler's number at the power] of `numeric_exp` e^numeric_exp^.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathExpInline]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-expm1]]
|
|
|
+===== `EXPM1`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+EXPM1(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+<1> float numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#expm1-double-[Euler's number at the power] of `numeric_exp` minus 1 (e^numeric_exp^ - 1).
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[abs]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathExpm1Inline]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* `CBRT`
|
|
|
+[[sql-functions-math-floor]]
|
|
|
+===== `FLOOR`
|
|
|
|
|
|
-https://en.wikipedia.org/wiki/Cube_root[Cube root], returns `double`
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+FLOOR(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
|
|
|
-// TODO make the example in the tests presentable
|
|
|
+*Input*:
|
|
|
|
|
|
-* `CEIL`
|
|
|
+<1> numeric expression
|
|
|
|
|
|
-https://en.wikipedia.org/wiki/Floor_and_ceiling_functions[Ceiling], returns `double`
|
|
|
+*Output*: integer or long numeric value
|
|
|
|
|
|
-* `CEILING`
|
|
|
+.Description:
|
|
|
|
|
|
-Same as `CEIL`
|
|
|
+Returns the largest integer less than or equal to `numeric_exp`.
|
|
|
|
|
|
-// TODO make the example in the tests presentable
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineFloor]
|
|
|
+--------------------------------------------------
|
|
|
|
|
|
-* `E`
|
|
|
+[[sql-functions-math-log]]
|
|
|
+===== `LOG`
|
|
|
|
|
|
-https://en.wikipedia.org/wiki/E_%28mathematical_constant%29[Euler's number], returns `2.7182818284590452354`
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+LOG(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Exponential_function[e^x^] (`EXP`)
|
|
|
+*Input*:
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Natural_logarithm[natural logarithm] of `numeric_exp`.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[exp]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineLog]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#expm1-double-[e^x^ - 1] (`EXPM1`)
|
|
|
+[[sql-functions-math-log10]]
|
|
|
+===== `LOG10`
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[expm1]
|
|
|
+LOG10(numeric_exp<1>)
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Floor_and_ceiling_functions[Floor] (`FLOOR`)
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
|
|
|
-// TODO make the example in the tests presentable
|
|
|
+.Description:
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Natural_logarithm[Natural logarithm] (`LOG`)
|
|
|
+Returns the https://en.wikipedia.org/wiki/Common_logarithm[base 10 logarithm] of `numeric_exp`.
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[log]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineLog10]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Logarithm[Logarithm] base 10 (`LOG10`)
|
|
|
+[[sql-functions-math-pi]]
|
|
|
+===== `PI`
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[log10]
|
|
|
+PI()
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* `ROUND`
|
|
|
+*Input*: _none_
|
|
|
+
|
|
|
+*Output*: `3.141592653589793`
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns https://en.wikipedia.org/wiki/Pi[PI number].
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathPINumber]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-power]]
|
|
|
+===== `POWER`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+POWER(numeric_exp<1>, integer_exp<2>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+<2> integer expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the value of `numeric_exp` to the power of `integer_exp`.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlinePowerPositive]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlinePowerNegative]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-round]]
|
|
|
+===== `ROUND`
|
|
|
|
|
|
.Synopsis:
|
|
|
[source, sql]
|
|
@@ -78,8 +286,8 @@ ROUND(numeric_exp<1>[, integer_exp<2>])
|
|
|
----
|
|
|
*Input*:
|
|
|
|
|
|
- <1> numeric expression
|
|
|
- <2> integer expression; optional
|
|
|
+<1> numeric expression
|
|
|
+<2> integer expression; optional
|
|
|
|
|
|
*Output*: numeric
|
|
|
|
|
@@ -89,24 +297,67 @@ Returns `numeric_exp` rounded to `integer_exp` places right of the decimal point
|
|
|
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`.
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/docs.csv-spec[mathRoundWithPositiveParameter]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/docs.csv-spec[mathRoundWithNegativeParameter]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Square_root[Square root] (`SQRT`)
|
|
|
+[[sql-functions-math-sign]]
|
|
|
+===== `SIGN`
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+SIGN(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*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.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[sqrt]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineSign]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* `TRUNCATE`
|
|
|
+
|
|
|
+[[sql-functions-math-sqrt]]
|
|
|
+===== `SQRT`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+SQRT(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns https://en.wikipedia.org/wiki/Square_root[square root] of `numeric_exp`.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineSqrt]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-truncate]]
|
|
|
+===== `TRUNCATE`
|
|
|
|
|
|
.Synopsis:
|
|
|
[source, sql]
|
|
@@ -115,8 +366,8 @@ TRUNCATE(numeric_exp<1>[, integer_exp<2>])
|
|
|
----
|
|
|
*Input*:
|
|
|
|
|
|
- <1> numeric expression
|
|
|
- <2> integer expression; optional
|
|
|
+<1> numeric expression
|
|
|
+<2> integer expression; optional
|
|
|
|
|
|
*Output*: numeric
|
|
|
|
|
@@ -126,86 +377,305 @@ Returns `numeric_exp` truncated to `integer_exp` places right of the decimal poi
|
|
|
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`.
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/docs.csv-spec[mathTruncateWithPositiveParameter]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
include-tagged::{sql-specs}/docs.csv-spec[mathTruncateWithNegativeParameter]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
==== Trigonometric
|
|
|
|
|
|
-* Convert from https://en.wikipedia.org/wiki/Radian[radians]
|
|
|
-to https://en.wikipedia.org/wiki/Degree_(angle)[degrees] (`DEGREES`)
|
|
|
+[[sql-functions-math-acos]]
|
|
|
+===== `ACOS`
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[degrees]
|
|
|
+ACOS(numeric_exp<1>)
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* Convert from https://en.wikipedia.org/wiki/Degree_(angle)[degrees]
|
|
|
-to https://en.wikipedia.org/wiki/Radian[radians] (`RADIANS`)
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+Returns the https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[arccosine] of `numeric_exp` as an angle, expressed in radians.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[degrees]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineAcos]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Trigonometric_functions#sine[Sine] (`SIN`)
|
|
|
+[[sql-functions-math-asin]]
|
|
|
+===== `ASIN`
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[sin]
|
|
|
+ASIN(numeric_exp<1>)
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Trigonometric_functions#cosine[Cosine] (`COS`)
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[arcsine] of `numeric_exp` as an angle, expressed in radians.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[cos]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineAsin]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Trigonometric_functions#tangent[Tangent] (`TAN`)
|
|
|
+[[sql-functions-math-atan]]
|
|
|
+===== `ATAN`
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[tan]
|
|
|
+ATAN(numeric_exp<1>)
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[Arc sine] (`ASIN`)
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[arctangent] of `numeric_exp` as an angle, expressed in radians.
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[asin]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineAtan]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[Arc cosine] (`ACOS`)
|
|
|
+[[sql-functions-math-atan2]]
|
|
|
+===== `ATAN2`
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[acos]
|
|
|
+ATAN2(ordinate<1>, abscisa<2>)
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[Arc tangent] (`ATAN`)
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+<2> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Atan2[arctangent of the `ordinate` and `abscisa` coordinates] specified as an angle, expressed in radians.
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[atan]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineAtan2]
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Hyperbolic_function[Hyperbolic sine] (`SINH`)
|
|
|
+[[sql-functions-math-cos]]
|
|
|
+===== `COS`
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+COS(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Trigonometric_functions#cosine[cosine] of `numeric_exp`, where `numeric_exp` is an angle expressed in radians.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineCosine]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-cosh]]
|
|
|
+===== `COSH`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+COSH(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Hyperbolic_function[hyperbolic cosine] of `numeric_exp`.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineCosh]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-cot]]
|
|
|
+===== `COT`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[sinh]
|
|
|
+COT(numeric_exp<1>)
|
|
|
--------------------------------------------------
|
|
|
|
|
|
-* https://en.wikipedia.org/wiki/Hyperbolic_function[Hyperbolic cosine] (`COSH`)
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Trigonometric_functions#Cosecant,_secant,_and_cotangent[cotangent] of `numeric_exp`, where `numeric_exp` is an angle expressed in radians.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineCotangent]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-degrees]]
|
|
|
+===== `DEGREES`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+DEGREES(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Convert from https://en.wikipedia.org/wiki/Radian[radians]
|
|
|
+to https://en.wikipedia.org/wiki/Degree_(angle)[degrees].
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineDegrees]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-radians]]
|
|
|
+===== `RADIANS`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+RADIANS(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Convert from https://en.wikipedia.org/wiki/Degree_(angle)[degrees]
|
|
|
+to https://en.wikipedia.org/wiki/Radian[radians].
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineRadians]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-sin]]
|
|
|
+===== `SIN`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+SIN(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Trigonometric_functions#sine[sine] of `numeric_exp`, where `numeric_exp` is an angle expressed in radians.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineSine]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-sinh]]
|
|
|
+===== `SINH`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+SINH(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Hyperbolic_function[hyperbolic sine] of `numeric_exp`.
|
|
|
+
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
+--------------------------------------------------
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineSinh]
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+[[sql-functions-math-tan]]
|
|
|
+===== `TAN`
|
|
|
+
|
|
|
+.Synopsis:
|
|
|
+[source, sql]
|
|
|
+--------------------------------------------------
|
|
|
+TAN(numeric_exp<1>)
|
|
|
+--------------------------------------------------
|
|
|
+
|
|
|
+*Input*:
|
|
|
+
|
|
|
+<1> numeric expression
|
|
|
+
|
|
|
+*Output*: double numeric value
|
|
|
+
|
|
|
+.Description:
|
|
|
+
|
|
|
+Returns the https://en.wikipedia.org/wiki/Trigonometric_functions#tangent[tangent] of `numeric_exp`, where `numeric_exp` is an angle expressed in radians.
|
|
|
|
|
|
-["source","sql",subs="attributes,callouts,macros"]
|
|
|
+["source","sql",subs="attributes,macros"]
|
|
|
--------------------------------------------------
|
|
|
-include-tagged::{sql-specs}/math.sql-spec[cosh]
|
|
|
+include-tagged::{sql-specs}/docs.csv-spec[mathInlineTanget]
|
|
|
--------------------------------------------------
|