# Mathematical functions in Dataflow SQL

All mathematical functions have the following behaviors:

• They return `NULL` if any of the input parameters is `NULL`.

### MOD

``````MOD(X, Y)
``````

Description

Modulo function: returns the remainder of the division of X by Y. Returned value has the same sign as X.

### CEIL

``````CEIL(X)
``````

Description

Returns the smallest integral value (with FLOAT64 type) that is not less than X.

### CEILING

``````CEILING(X)
``````

Description

Synonym of CEIL(X)

### FLOOR

``````FLOOR(X)
``````

Description

Returns the largest integral value (with FLOAT64 type) that is not greater than X.

#### Example rounding function behavior

Example behavior of Cloud Dataflow SQL rounding functions:

Input "X" CEIL(X) FLOOR(X)
2.0 2.0 2.0
2.3 3.0 2.0
2.8 3.0 2.0
2.5 3.0 2.0
-2.3 -2.0 -3.0
-2.8 -2.0 -3.0
-2.5 -2.0 -3.0
0 0 0
[{ "type": "thumb-down", "id": "hardToUnderstand", "label":"Hard to understand" },{ "type": "thumb-down", "id": "incorrectInformationOrSampleCode", "label":"Incorrect information or sample code" },{ "type": "thumb-down", "id": "missingTheInformationSamplesINeed", "label":"Missing the information/samples I need" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]