Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b134bf

Browse files
committed
Added comment about support for rational numbers, and pointer to
Demos/classes/Rat.py.
1 parent 7a2f066 commit 9b134bf

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Doc/lib/libmpz.tex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ \section{\module{mpz} ---
1919
(\function{mpz_*()}) routines are provided. If not stated
2020
otherwise, the description in the GNU MP documentation can be applied.
2121

22+
Support for rational numbers\index{rational numbers} can be
23+
implemented in Python. For an example, see the \module{Rat}%
24+
\withsubitem{(demo module)}{\ttindex{Rat}} module, provided as
25+
\file{Demos/classes/Rat.py} in the Python source distribution.
26+
2227
In general, \dfn{mpz}-numbers can be used just like other standard
23-
Python numbers, e.g.\ you can use the built-in operators like \code{+},
28+
Python numbers, e.g., you can use the built-in operators like \code{+},
2429
\code{*}, etc., as well as the standard built-in functions like
2530
\function{abs()}, \function{int()}, \ldots, \function{divmod()},
2631
\function{pow()}. \strong{Please note:} the \emph{bitwise-xor}

0 commit comments

Comments
 (0)