# Fmod - 指令碼與圖表函數

fmod() 是一個廣義模組函數，傳回整數除法中第一個引數 (被除數) 除以第二個引數 (除數) 的餘數部分。結果是實數。兩個引數都會解譯為實數，亦即不必為整數。

語法：

fmod(a, b)

傳回的資料類型： 數值

引數：

引數

| 引數 | 描述 |
| --- | --- |
| a | 被除數 |
| b | 除數 |

範例與結果：

範例與結果

| 範例 | 結果 |
| --- | --- |
| `fmod( 7,2   )` | 傳回 1 |
| `fmod( 7.5,2   )` | 傳回 1.5 |
| `fmod( 9,3   )` | 傳回 0 |
| `fmod( -4,3   )` | 傳回 -1 |
| `fmod( 4,-3   )` | 傳回 1 |
| `fmod( -4,-3   )` | 傳回 -1 |

## 瞭解更多資訊

* [Div - 指令碼與圖表函數](https://help.qlik.com/zh-TW/sense/November2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/div.htm)