Getting rid of bitwise operators in Python 3?

mensanator at aol.com mensanator at aol.com
Sun Sep 23 01:39:08 EDT 2007


On Sep 22, 10:23?pm, richy... at gmail.com wrote:
> On Sep 22, 9:10 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
>
> > Certainly xgcd should be in the math library or somewhere similar.
>
> It does feel odd to have modular exponentiation in the core but no
> other number-theoretic stuff in core+libraries.  Perhaps a proposal on
> python-ideas is in order... Though it's not clear what else would be
> useful;

Greatest Common Denominator
Least Common Multiple
Modular Inverse
Linear Congruence

(all found in gmpy)

> primality testing

Also in gmpy.

> and factoring

Alas, not in gmpy. I work around that by using a
custom version I made of factor.exe from the MIRACL
library. Which, alas, doesn't work quite right and
which I would think is beyond my ability to fix.
But this can be fixed in the Python program I use
to capture the factors.

> are obvious candidates, but I
> don't much fancy writing an MPQS factorization algorithm in Python.
> Well okay, I take that back---I wouldn't mind *writing* it;  I just
> wouldn't expect to get much speed from *running* it.  Miller-Rabin
> probabilistic primality testing would be easy to implement though.
>
> Anyway, I'm getting way off-topic here... sorry.
>
>
>
> > Not necessarily.  See for examplehttp://trevp.net/tlslite
>
> Interesting.  Thanks for the link.
>
> Richard





More information about the Python-list mailing list