On this page
  1. math.ceil
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

math.ceil

Prev: math.cbrt | Up: math | Next: math.comb
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.ceil
Tags: #public #python3 #stdlib #math


Import

import math
from math import ceil

Signature & Overview

math.ceil(x, /)

Return the ceiling of x as an Integral.

Usage

import math

assert math.ceil(2.1) == 3
assert math.ceil(-2.1) == -2

Gotchas

REPL Inspect

from math import ceil
help(ceil)

Linked from

Related notes