Skip to content

Commit

Permalink
added modpi etc. documentation. Updated the example for round() using…
Browse files Browse the repository at this point in the history
… non-ten basis
  • Loading branch information
fabianlischka committed Nov 18, 2013
1 parent 2dbb37d commit 3f7edd3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1972,6 +1972,18 @@ Mathematical Operators

Modulus after division, returning in the range [0,m)

.. function:: modpi(x)

Modulus after division by pi, returning in the range [0,pi). More accurate than mod(x,pi).

.. function:: mod2pi(x)

Modulus after division by 2pi, returning in the range [0,2pi). More accurate than mod(x,2pi).

.. function:: modpio2(x)

Modulus after division by pi/2, returning in the range [0,pi/2). More accurate than mod(x,pi/2).

.. function:: rem(x, m)

Remainder after division
Expand Down Expand Up @@ -2468,7 +2480,7 @@ Mathematical Functions

.. function:: round(x, [digits, [base]])

``round(x)`` returns the nearest integral value of the same type as ``x`` to ``x``. ``round(x, digits)`` rounds to the specified number of digits after the decimal place, or before if negative, e.g., ``round(pi,2)`` is ``3.14``. ``round(x, digits, base)`` rounds using a different base, defaulting to 10, e.g., ``round(pi, 3, 2)`` is ``3.125``.
``round(x)`` returns the nearest integral value of the same type as ``x`` to ``x``. ``round(x, digits)`` rounds to the specified number of digits after the decimal place, or before if negative, e.g., ``round(pi,2)`` is ``3.14``. ``round(x, digits, base)`` rounds using a different base, defaulting to 10, e.g., ``round(pi, 1, 8)`` is ``3.125``.

.. function:: ceil(x, [digits, [base]])

Expand Down

0 comments on commit 3f7edd3

Please sign in to comment.