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

math.floor

Prev: math.factorial | Up: math | Next: math.fma
Rel: math.acos, math.acosh, math.asin, math.asinh
Ref: docs.python.org — math.floor
Tags: #public #python3 #stdlib #math


Import

import math
from math import floor

Signature & Overview

math.floor(x, /)

Return the floor of x as an Integral.

Usage

import math

assert math.floor(2.9) == 2
assert math.floor(-2.1) == -3

Gotchas

REPL Inspect

from math import floor
help(floor)

Linked from

Related notes