# HG changeset patch # Parent fb70ea8b7b2d30123cd96f0ec7bbcae2b291282b Issue #26512: Clarify Integral; tidy up table of rounding functions Based on patch by Julien. diff -r fb70ea8b7b2d Doc/library/stdtypes.rst --- a/Doc/library/stdtypes.rst Tue Apr 26 09:31:11 2016 +0300 +++ b/Doc/library/stdtypes.rst Tue Apr 26 07:26:43 2016 +0000 @@ -361,19 +361,22 @@ All :class:`numbers.Real` types (:class:`int` and :class:`float`) also include the following operations: -+--------------------+------------------------------------+--------+ -| Operation | Result | Notes | -+====================+====================================+========+ -| ``math.trunc(x)`` | *x* truncated to Integral | | -+--------------------+------------------------------------+--------+ -| ``round(x[, n])`` | *x* rounded to n digits, | | -| | rounding half to even. If n is | | -| | omitted, it defaults to 0. | | -+--------------------+------------------------------------+--------+ -| ``math.floor(x)`` | the greatest integral float <= *x* | | -+--------------------+------------------------------------+--------+ -| ``math.ceil(x)`` | the least integral float >= *x* | | -+--------------------+------------------------------------+--------+ ++--------------------+---------------------------------------------+ +| Operation | Result | ++====================+=============================================+ +| :func:`math.trunc(\| *x* truncated to :class:`~numbers.Integral` | +| x) ` | | ++--------------------+---------------------------------------------+ +| :func:`round(x[, | *x* rounded to *n* digits, | +| n]) ` | rounding half to even. If *n* is | +| | omitted, it defaults to 0. | ++--------------------+---------------------------------------------+ +| :func:`math.floor(\| the greatest :class:`~numbers.Integral` | +| x) ` | <= *x* | ++--------------------+---------------------------------------------+ +| :func:`math.ceil(x)| the least :class:`~numbers.Integral` >= *x* | +| ` | | ++--------------------+---------------------------------------------+ For additional numeric operations see the :mod:`math` and :mod:`cmath` modules.