]> granicus.if.org Git - python/commitdiff
Added comment about support for rational numbers, and pointer to
authorFred Drake <fdrake@acm.org>
Thu, 10 Sep 1998 18:42:55 +0000 (18:42 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 10 Sep 1998 18:42:55 +0000 (18:42 +0000)
Demos/classes/Rat.py.

Doc/lib/libmpz.tex

index c761ea10228163367b1a5ee777a5ca51b206308b..eb5dea81bbb7845569a767cbe0b5d7282567d9dc 100644 (file)
@@ -19,8 +19,13 @@ arithmetic routines.  Only the interfaces to the \emph{integer}
 (\function{mpz_*()}) routines are provided. If not stated
 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
-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
 \function{abs()}, \function{int()}, \ldots, \function{divmod()},
 \function{pow()}.  \strong{Please note:} the \emph{bitwise-xor}