[Python-ideas] Complex rationals in Python.
arnodel at googlemail.com
Mon Nov 24 21:58:01 CET 2008
On 24 Nov 2008, at 20:24, Mark Dickinson wrote:
> On Mon, Nov 24, 2008 at 8:01 PM, Rocco Orlando Rossi
> <rocco.rossi at gmail.com> wrote:
>> I appreciate the inclusion of the fractions module in Python 2.6 and
>> therefore in Python 3.0. But I feel there's something missing: no
>> possibility for complex rationals (or arbitrary precision) integers.
> This seems like a specialist need to me---one that belongs in a Python
> extension package or library, but not in core Python.
> Another thought: the field Q(i) is just one of an infinite number
> of quadratic extensions of the field of rationals. Why implement
> that one and not the others? Put another way, the field of
> complex numbers is a fairly natural object, but the choice to
> represent it as reals adjoin sqrt(-1) is quite arbitrary---one
> could just as easily adjoin sqrt(-2), or sqrt(-3), or
> (-1+sqrt(-3))/2 instead.
If we want Q(i), then surely we also want Z[i]. Gaussian integers
have plenty of uses.
More information about the Python-ideas