Skip to main content

A few ad hoc numeric alogrithms: factors and primes.

Latest release 20220606: New intif(f): int(f) if that equals f, otherwise f.

Function factors(n)

Generator yielding the prime factors of n in order from lowest to highest.

Function intif(f: float)

Return int(f) if that equals f, otherwise f.

Function primes()

Generator yielding the primes in order starting at 2.

Release Log

Release 20220606: New intif(f): int(f) if that equals f, otherwise f.

Release 20190309: Superficial changes.

Release 20150311.2: Added RST doco for cs.numeric.

Release 20150311: Initial release with primes() and factors().

Download files

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

Source Distribution

cs.numeric-20220606.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cs.numeric-20220606-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file cs.numeric-20220606.tar.gz.

File metadata

  • Download URL: cs.numeric-20220606.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for cs.numeric-20220606.tar.gz
Algorithm Hash digest
SHA256 ceb73ea4728333eed9dcf2fd795d9baf174f7e049f22a2e646a613edc9d17177
MD5 bce0feb2c65c3a545676c9ba2ed63734
BLAKE2b-256 b56eb391c13f6b9150b8cb749534644b10e5c96ab189b2afb199e0482e6a5681

See more details on using hashes here.

File details

Details for the file cs.numeric-20220606-py3-none-any.whl.

File metadata

  • Download URL: cs.numeric-20220606-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for cs.numeric-20220606-py3-none-any.whl
Algorithm Hash digest
SHA256 d239b244a39e2537a512ffb352e607b11f17d80b8119d6d5b3be678d6704b1f1
MD5 c4bf4f487f55c0168f0ce46fa23d4758
BLAKE2b-256 82fe5e516fd1cac449459c4acac3d502b6d218b9f45b4921aaeb4641056bbba0

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

20220606 This release

2 files

20190309

1 file

20150311.2

1 file

Supported by

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