数学函数 (Azure Cosmos DB)Mathematical functions (Azure Cosmos DB)
适用于:
SQL API
每个数学函数均执行一个计算,基于作为参数提供的输出值,并返回数值。The mathematical functions each perform a calculation, based on input values that are provided as arguments, and return a numeric value.
可以运行以下示例所示的查询:You can run queries like the following example:
SELECT VALUE ABS(-4)
结果为:The result is:
[4]
函数Functions
以下支持的内置数学函数通常基于输入参数执行计算,并返回数值表达式:The following supported built-in mathematical functions perform a calculation, usually based on input arguments, and return a numeric expression:
- ABSABS
- ACOSACOS
- ASINASIN
- ATANATAN
- ATN2ATN2
- CEILINGCEILING
- COSCOS
- COTCOT
- DEGREESDEGREES
- EXPEXP
- FLOORFLOOR
- LOGLOG
- LOG10LOG10
- PIPI
- POWERPOWER
- RADIANSRADIANS
- RANDRAND
- ROUNDROUND
- SIGNSIGN
- SINSIN
- SQRTSQRT
- SQUARESQUARE
- TANTAN
- TRUNCTRUNC
除 RAND 以外的所有数学函数都为确定性函数。All mathematical functions, except for RAND, are deterministic functions. 这意味着在每次使用特定的输入值集调用这些函数时,它们都将返回相同的结果。This means they return the same results each time they are called with a specific set of input values.