Math Functions
math.ceil()
Round toward positive infinity. For non-floats, may dispatch to __ceil__.
Formal Syntax & Structure
python syntaxpython
math.ceil(x, /)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | real number | Input real value. |
Return Value
int
An integral result; custom hooks should return an integral value.
Working Example
Example Snippetpython
import mathprint(math.ceil(-2.7))