

如需與 Amazon Timestream for LiveAnalytics 類似的功能，請考慮使用 Amazon Timestream for InfluxDB。它提供簡化的資料擷取和單一位數毫秒查詢回應時間，以進行即時分析。[在這裡](https://docs.aws.amazon.com//timestream/latest/developerguide/timestream-for-influxdb.html)進一步了解。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 數學函式
<a name="mathematical-functions"></a>

Timestream for LiveAnalytics 支援下列數學函數。


| 函式 | 輸出資料類型 | Description | 
| --- | --- | --- | 
| abs(x) | 【與輸入相同】 | 傳回 x 的絕對值。 | 
| cbrt(x) | double | 傳回 x 的立方體根。 | 
| ceiling(x) 或 ceil(x) | 【與輸入相同】 | 傳回 x 四捨五入到最接近的整數。 | 
| degrees(x) | double | 將弧度的角度 x 轉換為度數。 | 
| e() | double | 傳回常數 Euler 的數字。 | 
| exp(x) | double | 傳回 Euler 提高到 x 能力的數字。 | 
| floor(x) | 【與輸入相同】 | 傳回 x 四捨五入至最接近的整數。 | 
| from\_base(string，radix) | bigint | 傳回解譯為 base-radix 數字的字串值。 | 
| ln(x) | double | 傳回 x 的自然對數。 | 
| log2(x) | double | 傳回 x 的基本 2 對數。 | 
| log10(x) | double | 傳回 x 的基本 10 個對數。 | 
| mod(n，m)  | 【與輸入相同】 | 傳回 n 除以 m 的模數 （餘量）。 | 
| pi()  | double | 傳回常數 Pi。 | 
| pow(x， p) 或 power(x， p) | double | 傳回提高到 p 能力的 x。 | 
| 弧度 (x) | double | 將角度 x 以度為單位轉換為弧度。 | 
| rand() 或 random() | double | 傳回 0.0 1.0 範圍內的虛擬隨機值。 | 
| random(n) | 【與輸入相同】 | 傳回介於 0 和 n 之間的虛擬隨機數字 （不含）。 | 
| round(x) | 【與輸入相同】 | 傳回 x 四捨五入至最接近的整數。 | 
| round(x，d) | 【與輸入相同】 | 傳回 x 四捨五入至小數位數。 | 
| sign(x) | 【與輸入相同】 | 傳回 x 的簽署函數，亦即：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/timestream/latest/developerguide/mathematical-functions.html)<br />對於雙引數，函數還會傳回：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/timestream/latest/developerguide/mathematical-functions.html) | 
| sqrt(x)  | double | 傳回 x 的平方根。 | 
| to\_base(x， radix)  | varchar | 傳回 x 的 base-radix 表示法。 | 
| truncate(x)  | double | 透過捨棄小數點後的數字，傳回 x 四捨五入至整數。 | 
| acos(x) | double | 傳回 x 的電弧餘弦。 | 
| asin(x)  | double | 傳回 x 的電弧正弦。 | 
| atan(x)  | double | 傳回 x 的電弧切線。 | 
| atan2(y， x) | double | 傳回 y / x 的電弧切線。 | 
| cos(x) | double | 傳回 x 的餘弦。 | 
| cosh(x) | double | 傳回 x 的雙曲餘弦。 | 
| sin(x)  | double | 傳回 x 的正弦。 | 
| tan(x) | double | 傳回 x 的切線。 | 
| tanh(x) | double | 傳回 x 的雙曲切線。 | 
| infinity() | double | 傳回代表正無限的常數。 | 
| is\_finite(x) | boolean | 判斷 x 是否為有限。 | 
| is\_infinite(x) | boolean | 判斷 x 是否無限。 | 
| is\_nan(x) | boolean | 判斷 x 是否為 not-a-number。 | 
| nan() | double | 傳回代表 not-a-number 的常數。 | 