Rational Numbers

Facundo Batista facundo at taniquetil.com.ar
Thu Jan 11 15:14:13 EST 2007

Noud Aldenhoven wrote:

> When I was programming in a mathematical project I began to wonder if python
> supports rational numbers[1]. In a language like magma[2] it's not such a
> problem. Does python supports something simular?

Python does not have rational numbers.

There's a (rejected) PEP about this, PEP-239:


Maybe you also want to read the section "Why not rational?" of


...and even take a look to gmpy:


Question: Why do you say that it's a problem?


.   Facundo
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/

More information about the Python-list mailing list