# HG changeset patch # Parent c502deb19cb09862f0748589b268356933abebdd Issue #26512: Clarify Integral; tidy up table of rounding functions Based on patch by Julien. diff -r c502deb19cb0 Doc/library/stdtypes.rst --- a/Doc/library/stdtypes.rst Mon Apr 25 09:17:54 2016 -0700 +++ b/Doc/library/stdtypes.rst Tue Apr 26 08:18:12 2016 +0000 @@ -393,19 +393,22 @@ All :class:`numbers.Real` types (:class:`int`, :class:`long`, 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 ties away from zero. 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 ties away from zero. If *n* | +| | is omitted, it defaults to 0. | ++--------------------+---------------------------------------------+ +| :func:`math.floor(\| the greatest integer as a float <= *x* | +| x) ` | | ++--------------------+---------------------------------------------+ +| :func:`math.ceil(x)| the least integer as a float >= *x* | +| ` | | ++--------------------+---------------------------------------------+ .. XXXJH exceptions: overflow (when? what operations?) zerodivision