Skip to main content

Fast prime factorization using the msieve library

Project description

Pysieve is a simple wrapper of the msieve prime factorization library. It basically gives you a fast factor command and some utilities.

For now it is only tested on OSX with python 2.6 and msieve146 but it should work on Linux as well. It assumes that the msieve library is installed in a standard location (i.e /usr/local/lib, /usr/lib or on OSX with macports /opt/local/lib)

Functions in the package

  • factor(n): returns a list of the prime factors of n

  • dfactor(n): returns a list of distinct prime factors of n (no duplicates)

  • facExponents(n): returns a list of tuples, each containing a prime factor of n and its exponent

TODO

  • _pysieve is installed as seperate package. I somehow can’t

    define it to be a subpackage of pysieve (like pysieve._pysieve)

Credits

The msieve library can be downloaded at http://sourceforge.net/projects/msieve/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PySieve-0.5.1.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file PySieve-0.5.1.tar.gz.

File metadata

  • Download URL: PySieve-0.5.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PySieve-0.5.1.tar.gz
Algorithm Hash digest
SHA256 45b458b8288b2e7a6214cacf28f138468ffbf6d0c7752b178c99d25e980e8b0a
MD5 0e119b186bb9ccae96591495fa80eab7
BLAKE2b-256 6fcaeecc2f9cb943e7af753ce23acf150646833b9a5e0db2d3b0f169aed965e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page