Kaydet (Commit) 9b134bf7 authored tarafından Fred Drake's avatar Fred Drake

Added comment about support for rational numbers, and pointer to

Demos/classes/Rat.py.
üst 7a2f0668
...@@ -19,8 +19,13 @@ arithmetic routines. Only the interfaces to the \emph{integer} ...@@ -19,8 +19,13 @@ arithmetic routines. Only the interfaces to the \emph{integer}
(\function{mpz_*()}) routines are provided. If not stated (\function{mpz_*()}) routines are provided. If not stated
otherwise, the description in the GNU MP documentation can be applied. otherwise, the description in the GNU MP documentation can be applied.
Support for rational numbers\index{rational numbers} can be
implemented in Python. For an example, see the \module{Rat}%
\withsubitem{(demo module)}{\ttindex{Rat}} module, provided as
\file{Demos/classes/Rat.py} in the Python source distribution.
In general, \dfn{mpz}-numbers can be used just like other standard In general, \dfn{mpz}-numbers can be used just like other standard
Python numbers, e.g.\ you can use the built-in operators like \code{+}, Python numbers, e.g., you can use the built-in operators like \code{+},
\code{*}, etc., as well as the standard built-in functions like \code{*}, etc., as well as the standard built-in functions like
\function{abs()}, \function{int()}, \ldots, \function{divmod()}, \function{abs()}, \function{int()}, \ldots, \function{divmod()},
\function{pow()}. \strong{Please note:} the \emph{bitwise-xor} \function{pow()}. \strong{Please note:} the \emph{bitwise-xor}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment