Macaulay2 » Documentation
Packages » Python » PythonObject » floor(PythonObject)
next | previous | forward | backward | up | index | toc

# floor(PythonObject) -- floor of a python object

- Function: floor
- Usage:
    `floor x`
- Inputs:
  - x, a python object,
- Outputs:
  - a python object,

## Description

This calls Python's built-in math.floor function, which rounds toward negative infinity.

    i1 : floor toPython 5.8

    o1 = 5

    o1 : PythonObject of class int

    i2 : floor toPython(-5.8)

    o2 = -6

    o2 : PythonObject of class int

## See also

- ceiling(PythonObject) -- ceiling of a python object
- truncate(PythonObject) -- truncate a python object

## Ways to use this method:

- floor(PythonObject) -- floor of a python object

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Python/doc/floating-point.m2:50:0.